C++ Programming Questions Answers - Chapter 1
-
1. Which of the following type of class allows only one object of it to be created
- Virtual class
- Abstract class
- Singleton class
- Friend class
Answer :
Option C
-
2. what is a class in c++
- Class in a collection of objects
- Class has noting to do with object
- It just have declaration of few variables
- None of above
Answer :
Option A
-
3. expression x.y represents as
- member x of object y
- member y of object x
- member y of object pointed by x
- all of above
Answer :
Option B
-
4. Which is not C++ storage class
- auto
- register
- static
- iostream
Answer :
Option D
Explanation:
Storage classes are:
auto
register
static
extern -
5. If no constructor is there, then compiler assumes the class to have a default constructor with no arguments
- True
- False
Answer :
Option A
-
6. Meaning of STL
- Standard Tree Library
- Standard Term Library
- Standard Template Library
- None of above
Answer :
Option C
-
7. If value has not type, then the pointer pointing to this value will be known as
- Empty pointer
- Null pointer
- Void pointer
- None of above
Answer :
Option C