Interview Questions on Classes & Objects in C++ : (29)
Question: 1
(A) Dcon DDest
(B) Dcon DDest BCon BDest
(C) BCon DCon DDest BDest
(D) BCon DCon BDes DDest
Compiler
Level: Beginner Category: classesAndobjects
[Posted by: | ]
Question: 2
(A) Constructor
(B) 0
(C) Compilation Error
(D) Runtime Error
Compiler
Level: Beginner Category: classesAndobjects
[Posted by: | ]
Question: 3
(A) Compilation Error - Constructor Missing
(B) Nothing would be printed
(C) Undefined
(D) In constructor
Compiler
Level: Beginner Category: classesAndobjects
[Posted by: | ]
Question: 4
(A) Yes
(B) No
Compiler
Level: Practitioner Category: classesAndobjects
[Posted by: | ]
Question: 6
(A) Yes
(B) No
Compiler
Level: Practitioner Category: classesAndobjects
[Posted by: | ]
Question: 7
(A) We can create n number of object
(B) We can create max 256 objects
(C) We can create 1 object
(D) We cant create object
Compiler
Level: Practitioner Category: classesAndobjects
[Posted by: | ]
Question: 8
(A) IS-A relation
(B) HAS-A relation
(C) USES-A
(D) PART-OF
Compiler
Level: Practitioner Category: classesAndobjects
[Posted by: | ]
Question: 9
(A) class
(B) field
(C) function
(D) property
Compiler
Level: Beginner Category: classesAndobjects
[Posted by: | ]
Question: 10
(A) 0
(B) 1
(C) 2
(D) error
Compiler
Level: Practitioner Category: classesAndobjects
[Posted by: | ]
Question: 11
(A) TRUE
(B) FALSE
Compiler
Level: Beginner Category: classesAndobjects
[Posted by: | ]
Question: 12
(A) True
(B) False
Compiler
Level: Beginner Category: classesAndobjects
[Posted by: | ]
Question: 13
(A) True
(B) False
Compiler
Level: Beginner Category: classesAndobjects
[Posted by: | ]
Question: 14
(A) Honda->run;
(B) Honda.run();
(C) run()
(D) Honda()
Compiler
Level: Beginner Category: classesAndobjects
[Posted by: | ]
Question: 15
(A) The programs runs with no output
(B) 77
(C) Hello!
(D) Hello!
Compiler
Level: Practitioner Category: classesAndobjects
[Posted by: | ]
Question: 16
(A) True
(B) False
Compiler
Level: Beginner Category: classesAndobjects
[Posted by: | ]
Question: 17
(A) static function
(B) utility function
(C) constructor
(D) destructor
Compiler
Level: Beginner Category: classesAndobjects
[Posted by: | ]
Question: 18
(A) True
(B) False
Compiler
Level: Beginner Category: classesAndobjects
[Posted by: | ]
Question: 19
(A) first variable name
(B) first function
(C) class name
(D) object name
Compiler
Level: Beginner Category: classesAndobjects
[Posted by: | ]
Question: 20
(A) True
(B) False
Compiler
Level: Practitioner Category: classesAndobjects
[Posted by: | ]
Question: 21
(A) True
(B) False
Compiler
Level: Beginner Category: classesAndobjects
[Posted by: | ]
Question: 22
(A) TRUE
(B) FALSE
Compiler
Level: Beginner Category: classesAndobjects
[Posted by: | ]
Question: 23
(A) True
(B) False
Compiler
Level: Beginner Category: classesAndobjects
[Posted by: | ]
Question: 24
(A) True
(B) False
Compiler
Level: Practitioner Category: classesAndobjects
[Posted by: | ]
Question: 25
(A) static
(B) auto
(C) exterb
(D) register
Compiler
Level: Practitioner Category: classesAndobjects
[Posted by: | ]
Question: 26
(A) True
(B) False
Compiler
Level: Practitioner Category: classesAndobjects
[Posted by: | ]
Question: 27
(A) never
(B) must
(C) may
(D) None
Compiler
Level: Beginner Category: classesAndobjects
[Posted by: | ]
Question: 28
(A) Compilation Error
(B) 10, 20
(C) 10, 10
(D) 10, Undfefined Value
Compiler
Level: Expert Category: classesAndobjects
[Posted by: | ]
Question: 29
(A) I am a const object.
(B) Compilation Error
(C) Runtime Error
(D) I am a const object.
Compiler
Level: Experts Category: classesAndobjects
[Posted by: | ]
C++ Online Test
Compile C++ code here
Browse C++ Categories
Loops Conditional Functions Operators Structure Enum Data Types Inheritance Pointers Classes & Objects Vtable Type Casting New & Delete Namespaces Virtual Functions Abstract Class STL Singleton Class Exceptions C++11 C++17 C++20 Time & Space Complexity othersSwitch to C Questions