Home C C++ Java Python Perl PHP SQL JavaScript Linux Selenium QT Online Test

Home » C++ » Questions on Classes & Objects in C++

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


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: Admin | Chicago, USA]


Question: 2

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

Compiler
Level: Beginner Category: classesAndobjects
[Posted by: Admin | Chicago, USA]


Question: 3

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

Compiler
Level: Beginner Category: classesAndobjects
[Posted by: Admin | Chicago, USA]


Question: 4

(A) Yes
(B) No

Compiler
Level: Practitioner Category: classesAndobjects
[Posted by: Admin | Chicago, USA]


Question: 5

(A) Yes
(B) No

Compiler
Level: Expert Category: classesAndobjects
[Posted by: Admin | Chicago, USA]


Question: 6

(A) Yes
(B) No

Compiler
Level: Practitioner Category: classesAndobjects
[Posted by: Admin | 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

Compiler
Level: Practitioner Category: classesAndobjects
[Posted by: Admin | Chicago, USA]


Question: 8

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

Compiler
Level: Practitioner Category: classesAndobjects
[Posted by: Admin | Chicago, USA]


Question: 9

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

Compiler
Level: Beginner Category: classesAndobjects
[Posted by: Admin | Chicago, USA]


Question: 10

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

Compiler
Level: Practitioner Category: classesAndobjects
[Posted by: Rohit Iparkar | Pune]


Question: 11

(A) TRUE
(B) FALSE

Compiler
Level: Beginner Category: classesAndobjects
[Posted by: Andrew | New Jersey]


Question: 12

(A) True
(B) False

Compiler
Level: Beginner Category: classesAndobjects
[Posted by: Andrew | New Jersey]


Question: 13

(A) True
(B) False

Compiler
Level: Beginner Category: classesAndobjects
[Posted by: Andrew | New Jersey]


Question: 14

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

Compiler
Level: Beginner Category: classesAndobjects
[Posted by: Andrew | New Jersey]


Question: 15

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

Compiler
Level: Practitioner Category: classesAndobjects
[Posted by: Andrew | New Jersey]


Question: 16

(A) True
(B) False

Compiler
Level: Beginner Category: classesAndobjects
[Posted by: Andrew | New Jersey]


Question: 17

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

Compiler
Level: Beginner Category: classesAndobjects
[Posted by: Andrew | New Jersey]


Question: 18

(A) True
(B) False

Compiler
Level: Beginner Category: classesAndobjects
[Posted by: Andrew | New Jersey]


Question: 19

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

Compiler
Level: Beginner Category: classesAndobjects
[Posted by: Andrew | New Jersey]


Question: 20

(A) True
(B) False

Compiler
Level: Practitioner Category: classesAndobjects
[Posted by: Andrew | New Jersey]


Question: 21

(A) True
(B) False

Compiler
Level: Beginner Category: classesAndobjects
[Posted by: Andrew | New Jersey]


Question: 22

(A) TRUE
(B) FALSE

Compiler
Level: Beginner Category: classesAndobjects
[Posted by: Andrew | New Jersey]


Question: 23

(A) True
(B) False

Compiler
Level: Beginner Category: classesAndobjects
[Posted by: Andrew | New Jersey]


Question: 24

(A) True
(B) False

Compiler
Level: Practitioner Category: classesAndobjects
[Posted by: Andrew | New Jersey]


Question: 25

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

Compiler
Level: Practitioner Category: classesAndobjects
[Posted by: Andrew | New Jersey]


Question: 26

(A) True
(B) False

Compiler
Level: Practitioner Category: classesAndobjects
[Posted by: Andrew | New Jersey]


Question: 27

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

Compiler
Level: Beginner Category: classesAndobjects
[Posted by: Andrew | New Jersey]


Question: 28

(A) Compilation Error
(B) 10, 20
(C) 10, 10
(D) 10, Undfefined Value

Compiler
Level: Expert Category: classesAndobjects
[Posted by: Admin | Chicago, USA]


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 gcc/g++ others

Switch to C Questions