1. Which of the following statement is correct?
A) Object is an instance of data type.
B) Object is an instance of a class.
C) Class is an instance of object.
D) Class is an instance of data type.
Correct Answer: Object is an instance of a class.
2. Who developed C++?
A) Brenden Eich
B) Bjarne Stroustrup
C) Gemes Gosling
D) Dennis Ritchie
Correct Answer: Bjarne Stroustrup
Explanation : C++ programming language was developd by Bjarne Stroustrup in 1979 at AT&T Bell Labs.
3. Which of the following user-defined header file extension used in c++?
A) hf
B) h
C) cpp
D) None
Correct Answer: cpp
4. Which of the following is the correct identifier?
A) VAR_123
B) $var_name
C) __varname
D) None of the above
Correct Answer: VAR_123
5. Which of the following statement is true?
A) All objects of a class share all data members of class.
B) Objects of a class do not share non-static members. Every object has its own copy.
C) Objects of a class do not share codes of non-static methods, they have their own copy
D) None
Correct Answer: Objects of a class do not share non-static members. Every object has its own copy.
6. Which data type can be used to hold a wide character in C++?
A) unsigned char
B) int
C) wchar_t
D) None
Correct Answer: wchar_t
Explanation : wchar_t data type can be used to hold a wide character in C++.
7. Which one is not a correct variable type in C++?
A) real
B) float
C) int
D) double
Correct Answer: real
8. A C++ code line ends with Semicolon(;).
A) True
B) False
Correct Answer: True
9. A ponter pointing to a variable that is not initialized is called ____
A) Null Pointer
B) Empty Pointer
C) Wild Pointer
D) Void Pointer
Correct Answer: Null Pointer
Explanation : A ponter pointing to a variable that is not initialized is called Null Pointer.