C++ Programming Questions Answers - Chapter 1
-
1. All members of class have which access to its members
- private
- public
- protected
- depends
Answer And Explanation
Answer: Option A
-
2. Which operator is used to define a member of a class from outside the class definition
- ->
- ::
- .
- >>
Answer And Explanation
Answer: Option B
-
3. Constructor is
- A class automatically called whenever a new object of this class is created
- A class automatically called whenever a new object of this class is destroyed
- A function automatically called whenever a new object of this class is created
- A function automatically called whenever a new object of this class is destroyed
Answer And Explanation
Answer: Option C
-
4. If no constructor is there, then compiler assumes the class to have a default constructor with no arguments
- True
- False
Answer And Explanation
Answer: Option A