Wikipedia

Search results

C++ Programming Questions and Answers

1.  Which of the following type of class allows only one object of it to be created?
A. Virtual class
B. Abstract class
C. Singleton class
D. Friend class
Answer & Explanation
Answer: Option C
Explanation:
No answer description available for this question.

2.  Which of the following is not a type of constructor?
A. Copy constructor
B. Friend constructor
C. Default constructor
D. Parameterized constructor
Answer & Explanation
Answer: Option B
Explanation:No answer description available for this question.

3.  Which of the following statements is correct?
A. Base class pointer cannot point to derived class.
B. Derived class pointer cannot point to base class.
C. Pointer to derived class cannot be created.
D. Pointer to base class cannot be created.
Answer & Explanation
Answer: Option B
Explanation:No answer description available for this question.


4.  Which of the following is not the member of class?
A. Static function
B. Friend function
C. Const function
D. Virtual function
Answer: Option B
Explanation:No answer description available for this question.

5.  Which of the following concepts means determining at runtime what method to invoke?
A. Data hiding
B. Dynamic Typing
C. Dynamic binding
D. Dynamic loading
Answer & Explanation
Answer: Option C
Explanation:No answer description available for this question.



7.  Which of the following concept of oops allows compiler to insert arguments in a function call if it is not specified?
A. Call by value
B. Call by reference
C. Default arguments
D. Call by pointer
Answer & Explanation
Answer: Option C
Explanation:
No answer description available for this question. 

8.  How many instances of an abstract class can be created?
A. 1B. 5
C. 13D. 0
Answer & Explanation
Answer: Option D
Explanation:
No answer description available for this question.

9.  Which of the following cannot be friend?
A. Function
B. Class
C. Object
D. Operator function
Answer & Explanation
Answer: Option C
Explanation:
No answer description available for this question.

10.  Which of the following concepts of OOPS means exposing only necessary information to client?
A. Encapsulation
B. Abstraction
C. Data hiding
D. Data binding
Answer & Explanation
Answer: Option C
Explanation:
No answer description available for this question.
11.  Why reference is not same as a pointer?
A. A reference can never be null.
B. A reference once established cannot be changed.
C. Reference doesn't need an explicit dereferencing mechanism.
D. All of the above.
Answer & Explanation
Answer: Option D
Explanation:
No answer description available for this question. 

12.  cout is a/an __________ .
A. operatorB. function
C. objectD. macro
Answer & Explanation
Answer: Option C
Explanation:
No answer description available for this question. 

13.  Which of the following concepts provides facility of using object of one class inside another class?
A. EncapsulationB. Abstraction
C. CompositionD. Inheritance
Answer & Explanation
Answer: Option C
Explanation:
No answer description available for this question.

14.  How many types of polymorphisms are supported by C++?
A. 1B. 2
C. 3D. 4
Answer & Explanation
Answer: Option B
Explanation:
The two main types of polymorphism are run-time (implemented as inheritance and virtual functions), and compile-time (implemented as templates).

15.  Which of the following is an abstract data type?
A. intB. double
C. stringD. Class
Answer & Explanation
Answer: Option D
Explanation:
No answer description available for this question. 

0 comments:

Post a Comment