C PDF
C PDF
Logo of c++
Answer: Option B
2. Which of the following concept of oops allows compiler to insert arguments in a function call if it is
not specified?
A. Default arguments
B. Call by reference
C. Call by value
D. Call by pointer
Answer: Option A
A. 3
B. 2
C. 1
D. 4
Answer: Option B
4. Which of the following correctly describes overloading of functions?
A. Ad-hoc polymorphism
B. Transient polymorphism
C. Virtual polymorphism
D. Pseudo polymorphism
Answer: Option A
Answer: Option B
6. What happens when we try to compile the class definition in following code snippet?
A. It will not compile because a class cannot be protectedly inherited from other class.
A. Friend Functions
B. Member Variables
C. Member Functions
D. Object
Answer: Option D
class Bike
Engine objEng;
};
class Engine
float CC;
};
A. kind of relationship
B. Inheritance
C. has a relationship
D. Both A and C
Answer: Option C
9. Which of the following means “The use of an object of one class in definition of another class”?
A. Encapsulation
B. Abstraction
C. Composition
D. Inheritance
Answer: Option C
A. Object
B. Operators
C. Functions
D. Both B and C
Answer: Option D
D. Both A and C.
Answer: Option A
Answer: Option E
C. Both A and B.
Answer: Option B
14. Which of the following function / types of function cannot have default parameters?
C. main()
D. Both B and C
Answer: Option C
15. What happens when a class with parameterized constructors and having no default constructor is
used in a program and we create an object that needs a zero-argument constructor?
A. Runtime error.
B. Preprocessing error.
C. Compile-time error.
D. Runtime exception.
Answer: Option C
A. only pass-by-reference
B. only pass-by-value
Answer: Option A
17. Which of the following gets called when an object goes out of scope?
A. constructor
B. virtual function
C. main
D. destructor
Answer: Option D
18. Which of the following are NOT provided by the compiler by default?
A. Zero-argument Constructor
B. Copy Destructor
C. Copy Constructor
D. Destructor
Answer: Option B
19. If the programmer does not explicitly provide a destructor, then which of the following creates an
empty destructor?
A. Preprocessor
B. main() function
C. Linker
D. Compiler
Answer: Option D
20. Which of the following implicitly creates a default constructor when the programmer does not
explicitly define at least one constructor for a class?
A. Preprocessor
B. Compiler
C. Loader
D. Linker
Answer: Option B
A. Default constructor
B. Friend function
C. Member function
D. const function
Answer: Option A
B. Constructor is called either implicitly or explicitly, whereas destructor is always called implicitly.
D. Constructor and destructor functions are not called at all as they are always inline.
Answer: Option B
23. To ensure that every object in the array receives a destructor call, always delete memory allocated
as an array with operator __________ .
A. delete[] B. Delete
C. destructor
D. kill[] E. Free[]
Answer: Option A
Int main(){
Int i=10;
Static int x=i;
If(x==i)
Printf(“Equal”);
Else if(x>i)
Printf(“Greater than”);
Else
Printf(“Less than”);
Return 0;
A. Equal
B. Compiler error
C. Less than
D. Greater than
Answer: Option B
25. What will be output if you will compile and execute the following c code?
#include
Int main(){
Int a=1,2;
Int b=(1,2);
Printf(“%d %d”,a,b);
Return 0;
A. 1,1
B. 2,2
C. 2,1
D. 1,2
Answer: Option D
Toggle navigation
Question: 1
Ans: A
Question: 2
Ans: A
Class object and member of that class
Question: 3
A static function
Ans: B
Question: 4
(A) <iostream.h>
(B) <stdio.h>
(C) <math.h>
(D) <stdlib.h>
Ans: C
<math.h>
Question: 5
(A) A method
Ans: C
Toggle navigation
1000+ C++ Questions and Answers Pdf – 2
Question: 6
A function argument is a
(C) Variable in the function that receives a value from the calling program
(D) Way that functions resist accepting the calling program’s values
Ans: A
Question: 7
Ans: D
Question: 8
(A) Sixth
(B) Seventh
(C) Eighth
(D) Impossible
Ans: C
Eighth
Question: 9
Ans: C
Question: 10
(A) A constant
(B) A variable
(C) A structure
All of these
Prev123
Exercise
Cpp Quiz
Cpp Quiz1
Cpp Quiz2
Cpp Quiz3
Cpp Quiz4
Cpp Quiz5
Cpp Quiz6
Cpp Quiz7
Cpp Quiz8
Cpp Quiz9
Cpp Quiz10
More Categories
Basic Statements
Operating System
Windows Explorer
Abbreviation
Ms Excel
C Langauges Mcq
Database
Windows Explorer
Operating System
Number System
Compiler Design
Web Design
Star Office
Spreadsheet
Computer Information
Related Questions
C++-Multiple-Choice-Questions-Answers.Pdf
C++-Objective-Questions-And-Answers.Pdf
C++-Questions-And-Answers.Pdf
C++-Quiz-Questions-Answers.Pdf
Recent Articles
Top 1000+ Preposition Questions for SSC Exams More
June-19-2021 | Meritnotes
June-18-2021 | Meritnotes
June-17-2021 | Meritnotes
June-16-2021 | Meritnotes
1000+ Computer Awareness Questions with Answers for Bank Exams More
June-15-2021 | Meritnotes
June-14-2021 | Meritnotes
Trending Posts
Computer Science Quiz Questions with Answers Multiple Choice 2019-2020 More
August-28-2019 | Meritnotes
December-10-2019 | Meritnotes
Top 10+ Newtons Law of Motion MCQs Quiz, Gk Questions and Answers More
August-28-2019 | Meritnotes
August-28-2019 | Meritnotes
August-28-2019 | Meritnotes
August-28-2019 | Meritnotes
Email address
Enter email
Home
Contact
2021 © MeritNotes
In a linked list