C++ Programming Questions Answers - Set 2
-
43. Which operators can not be overloaded ?
- Binary operator
- Ternary operator
- Unary operator
- All can be overloaded
Answer :
Option B
-
44. A class having no public constructors is
- A public protected class
- A public class
- A protected class
- A private class
Answer :
Option D
-
45. A Variable __ of void type.
- May be declared
- Can be initialized
- Cannot be intialized
- Cannot be declared
Answer :
Option D
-
46. Which among following is correct way of declaring object of a class ?
- Only argument I is strong
- Only argument II is strong
- Either I or II is strong
- Neither I nor II is strong
- Both I and II are strong
- Classname Objectname;
- Class Classname Objectname;
- Class Classname Object Objectname;
- Classname Object Objectname;
Answer :
Option F
-
47. Constructors has return type void ?
- True
- False
Answer :
Option A
-
48. The default visibility mode while inheriting is ?
- public
- protected
- private
- may be any of above
Answer :
Option C
-
49. The major goal of inheritance in C++ is ?
- To facilitate the reusability of code
- To help modular programming
- To facilitate the conversion of data types
- To extend the capabilities of a class
Answer :
Option A