Interview Questions on C C++

Home  |  About Us  |  Contact
View Questions Contribute Training Misc..

Interview Questions on Classes & Objects in C++ : (27) Questions

You are here : Home » Interview Questions on Classes & Objects in C++


Question: 1

(A) Dcon DDest
(B) Dcon DDest BCon BDest
(C) BCon DCon DDest BDest

D. BCon DCon BDes DDest

[Posted by: Admin | Location: Chicago, USA]



Question: 2

(A) Constructor
(B) 0
(C) Compilation Error

D. Runtime Error

[Posted by: Admin | Location: Chicago, USA]



Question: 3

(A) Compilation Error - Constructor Missing
(B) Nothing would be printed
(C) Undefined

D. In constructor

[Posted by: Admin | Location: Chicago, USA]



Question: 4

(A) Yes
(B) No

[Posted by: Admin | Location: Chicago, USA]



Question: 5

(A) Yes
(B) No

[Posted by: Admin | Location: Chicago, USA]



Question: 6

(A) Yes
(B) No

[Posted by: Admin | Location: Chicago, USA]



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

[Posted by: Admin | Location: Chicago, USA]



Question: 8

(A) IS-A relation
(B) HAS-A relation
(C) None of these

[Posted by: Admin | Location: Chicago, USA]



Question: 9

(A) class
(B) field
(C) function

D. property

[Posted by: Admin | Location: Chicago, USA]



Question: 10

(A) 0
(B) 1
(C) 2

D. error

[Posted by: Rohit Iparkar | Location: Pune]



Question: 11

(A) TRUE
(B) FALSE

[Posted by: Andrew | Location: New Jersey]



Question: 12

(A) True
(B) False

[Posted by: Andrew | Location: New Jersey]



Question: 13

(A) True
(B) False

[Posted by: Andrew | Location: New Jersey]



Question: 14

(A) Honda->run;
(B) Honda.run();
(C) run()

D. Honda()

[Posted by: Andrew | Location: New Jersey]



Question: 15

(A) The programs runs with no output
(B) 77
(C) Hello!

D. Hello!

[Posted by: Andrew | Location: New Jersey]



Question: 16

(A) True
(B) False

[Posted by: Andrew | Location: New Jersey]



Question: 17

(A) static function
(B) utility function
(C) constructor

D. destructor

[Posted by: Andrew | Location: New Jersey]



Question: 18

(A) True
(B) False

[Posted by: Andrew | Location: New Jersey]



Question: 19

(A) first variable name
(B) first function
(C) class name

D. object name

[Posted by: Andrew | Location: New Jersey]



Question: 20

(A) True
(B) False

[Posted by: Andrew | Location: New Jersey]



Question: 21

(A) True
(B) False

[Posted by: Andrew | Location: New Jersey]



Question: 22

(A) TRUE
(B) FALSE

[Posted by: Andrew | Location: New Jersey]



Question: 23

(A) True
(B) False

[Posted by: Andrew | Location: New Jersey]



Question: 24

(A) True
(B) False

[Posted by: Andrew | Location: New Jersey]



Question: 25

(A) static
(B) auto
(C) exterb

D. register

[Posted by: Andrew | Location: New Jersey]



Question: 26

(A) True
(B) False

[Posted by: Andrew | Location: New Jersey]



Question: 27

(A) never
(B) must
(C) may

D. None

[Posted by: Andrew | Location: New Jersey]




Compile C++ code here  |  Upload your Questions

C++ Objective Questions By Different Categories:-
Loops | Conditional | Functions | Operators | Structure | Enum | Storage Classes | Union | FileHandling | Data Types | Inheritance | Pointers | Classes & Objects | Vtable | Type Casting | New & Delete | Namespaces | Reference Variables | Static Cast | Dynamic Cast | Reinterpret Cast | Const Cast | Virtual Functions | Abstract Class | STL | Singleton Class | C++ 11 | C++ 14 | C++ 17 | C++ 20 | gcc/g++ | others


Switch to C Questions