You are on page 1of 14

Question No.

1 of 30
The first fully Object-oriented language is
a. Java
b. C++
c. Simula
d. None of the Above
Question No. 2 of 30
The value of EOF is
a. 1
b. 0
c. Infinity
d. -1
Question No. 3 of 30
Which of the following notation compares two variables X and Y?
a. X==Y
b. X=Y
c. X!=Y
d. X equals Y
Question No. 4 of 30
Which of the following denote stream classes in C++?
a. ios
b. fstream
c. ostream
d. All the Above
Question No. 5 of 30
Which of the following allocates memory but does not initialize it?
a. new operator
b. operator new
c. Both A and B
d. None of the Above
Question No. 6 of 30
Which of the following statements are TRUE?
a. Reference variables must be initialized in C++
b. Array of reference is possible
c. Both A) and B)
d. None of the Above
Question No. 7 of 30
The private member in derived class
a. Cannot be inherited
b. Can be inherited at all instances
c. Can be inherited only if the derived class is inheriting from base class with
private access level
d. None of the Above
Question No. 8 of 30
Which of the following is used in C++ to create a copy of an object?
a. Assignment operator
b. Copy constructor
c. Both A) and B)
d. None of the Above
Question No. 9 of 30
Which of the following denote insertion operator in C++?
a. &
b. <
c. <<
d. !
Question No. 10 of 30
The output of operation 20%3 is
a. 6
b. 2
c. 1
d. 4
Question No. 11 of 30
If a function in C++ does not return a value then its return type is denoted as
a. float
b. void
c. int
d. None of the Above
Question No. 12 of 30
Which of the following denote operator of logical AND?
a. &&
b. ^&
c. !&
d. &
Question No. 13 of 30
Which of the following operators cannot be overloaded?
a. sizeof
b. ::
c. :?
d. All the Above
Question No. 14 of 30
The vtable entry for a pure virtual function in C++ is
a. zero
b. NULL
c. one
d. No Entry in vtable
Question No. 15 of 30
Virtual functions are defined in
a. Derived class
b. Base class
c. Both A and B
d. None of the Above
Question No. 16 of 30
Comments in C++ program is written by using
a. / /
b. //
c. /* /*
d. *
Question No. 17 of 30
In Late binding the function calls gets resolved during
a. Compile Time
b. Run Time
c. Both A and B
d. None of the Above
Question No. 18 of 30
Which of the following denotes growable array?
a. Vector
b. ArrayList
c. Both A and B
d. None of the Above
Question No. 19 of 30
Reference to its own class can be accepted by
a. simple constructor
b. copy constructor
c. Both A and B
d. None of the Above
Question No. 20 of 30
The operator that denotes address of a variable in C++ program is
a. *
b. %
c. $
d. &
Question No. 21 of 30
The notation used for representing destructor in C++ program is
a. !
b. &
c. *
d. ~
Question No. 22 of 30
The header that should be included while using manipulators in C++ is
a. iomanip.h
b. manip.h
c. ifstream.h
d. None of the Above
Question No. 23 of 30
The isolation of data from direct access by a C+ program is called as
a. Data Hiding
b. Data Isolation
c. Data Encapsulation
d. None of the Above
Question No. 24 of 30
The notation of member access operator in structures is
a. &
b. .
c. $
d. *
Question No. 25 of 30
The notation of logical NOT operator in a C++ program is
a. :
b. ;
c. !
d. None of the Above
Question No. 26 of 30
In C++ the function that is used to release the block of memory already used is
a. release
b. deallocate
c. delete
d. All the Above
Question No. 27 of 30
An instance of a user-defined type is called
a. Class
b. Object
c. Method
d. None of the Above
Question No. 28 of 30
Which of the following denote types of polymorphism in C++?
a. Virtual function
b. Function overloading
c. Operator Overloading
d. All the Above
Question No. 29 of 30
Which of the following can be used to initialize a newly declared variable from an
existing variable?
a. Virtual Function
b. Namespaces
c. copy constructor
d. None of the Above
Question No. 30 of 30
A function in a C++ program can be called
a. Only Once
b. Cannot be called at all
c. Any number of times
d. None of the Above
1. The first fully Object-oriented language is
Answer: Simula
2. Which of the following notation compares two variables X and Y?
Answer: X==Y
3. Which of the following denote stream classes in C++?
Answer: All the Above
4. Which of the following allocates memory but does not initialize it?
Answer: operator new
5. The private member in derived class
Answer: Can be inherited only if the derived class is inheriting from base class with
private access level
6. Which of the following is used in C++ to create a copy of an object?
Answer: Copy constructor
7. The output of operation 20%3 is
Answer: 2
8. If a function in C++ does not return a value then its return type is denoted as
Answer: void
9. Which of the following denote operator of logical AND?
Answer: &&
10. Which of the following operators cannot be overloaded?
Answer: All the Above
11. Virtual functions are defined in
Answer: Derived class
12. Comments in C++ program is written by using
Answer: //
13. In Late binding the function calls gets resolved during
Answer: Run Time
14. The operator that denotes address of a variable in C++ program is
Answer: &
15. The notation used for representing destructor in C++ program is
Answer: ~
16. The header that should be included while using manipulators in C++ is
Answer: iomanip.h
17. The notation of member access operator in structures is
Answer: .
18. The notation of logical NOT operator in a C++ program is
Answer: !
19. In C++ the function that is used to release the block of memory already used is
Answer: delete
20. An instance of a user-defined type is called
Answer: Object
21. Which of the following denote types of polymorphism in C++?
Answer: All the Above
22. Which of the following can be used to initialize a newly declared variable from an
existing variable?
Answer: copy constructor
23. A function in a C++ program can be called
Answer: Any number of times
Incorrect Questions (7 / 30)
1. The value of EOF is
Answer: -1
2. Which of the following statements are TRUE?
Answer: Reference variables must be initialized in C++
3. Which of the following denote insertion operator in C++?
Answer: <<
4. The vtable entry for a pure virtual function in C++ is
Answer: NULL
5. Which of the following denotes growable array?
Answer: Both A and B
6. Reference to its own class can be accepted by
Answer: copy constructor
7. The isolation of data from direct access by a C+ program is called as
Answer: Data Hiding
Which of the following is an error statement in C++ array declaration?
int exforsys[5];
float exforsys[5][5];
int exforsys(10);
None of the Above

The notation used for representing destructor in C++ program is


!
&
*
~

Index of an array starts from


One
Zero
Two
None of the Above

What is the value of variable z when the following program segment ends? int z; for(z=0;
z<50; z++) {}
51
49
0
50

Which of the following OOPS concepts are used with cin and cout?
Encapsulation
Data Hiding
Operator Overloading
None of the Above

Mutable keyword can be applied to


non-static data members of a class
non-const data members of a class
Both A and B
None of the Above

When dynamically allocated memory is lost to the C++ program then


warning occurs
memory leak occurs
The program executes successfully
None of the above
Objects have
behavior
state
Both A and B
None of the Above

The header file that must be included while using cout function in a C++ program is
conio.h
math.h
iostream.h
None of the Above

Which of the following denote newline character in C++ program?


'\n'
'/n'
'nc'
'/nc'

The actual implementation is present in


declaration
definition
Both A and B
None of the Above

Which of the following denotes growable array?


Vector
ArrayList
Both A and B
None of the Above

A function named as exforsys has three implementations associated with it. This means
the function exforsys is
overloaded
Overriding
Both A and B
None of the Above

Which of the following denote advantages of inheritance?


saves program development time
code reusability
Both A and B
All the Above

Which of the following denote C++ looping statement?


while
do-while
for
All the Above

What is the minimum number of times a do loop would definitely get executed?
0
1
Infinity
Could not be predicted

Using pointers to call a function is called as


call by value
call by reference
call by address
All the Above

The members of a class are by default


private
public
protected
None of the Above

A condition that must be true on exit from a member function if called as


Precondition
Post-condition
Both A and B
None of the Above
The class that in C++ for file input is
ifstream
ofstream
Both A and B
The class that in C++ for file input is

Which of the following denote incorrect data type in C++?


real
double
float
int

Inheritance in C++ have default access specifier as


private
public
protected
None of the Above

When object of the first class is instantiated then which of the following is called?
Destructor
Constructor
Both A and B
None of the Above

The block of memory allocated by the new is released by using


delete
realloc
Both A and B
None of the Above

The first fully Object-oriented language is


Java
C++
Simula
None of the Above

A template can be instantiated by


Explicit Instantiation
Implicit instantiation
Both A and B
None of the Above

The function named as exforsys declared as int exforsys(float x, double y) has return type
as
double
int
float
None of the Above

A function in a C++ program can be called


Only Once
Cannot be called at all
Any number of times
None of the Above

Correct Questions (20 / 30)


1. The vtable entry for a pure virtual function in C++ is
Answer: NULL
2. Which of the following is an error statement in C++ array declaration?

Answer: int exforsys(10);


3. The notation used for representing destructor in C++ program is

Answer: ~
4. Index of an array starts from

Answer: Zero
5. Objects have

Answer: Both A and B


6. The header file that must be included while using cout function in a C++ program is

Answer: iostream.h
7. Which of the following denote newline character in C++ program?

Answer: '\n'
8. A function named as exforsys has three implementations associated with it. This means
the function exforsys is

Answer: overloaded
9. Which of the following denote C++ looping statement?

Answer: All the Above


10. What is the minimum number of times a do loop would definitely get executed?

Answer: 1
11. Using pointers to call a function is called as

Answer: call by reference


12. The members of a class are by default

Answer: private
13. A condition that must be true on exit from a member function if called as

Answer: Post-condition
14. The class that in C++ for file input is

Answer: ifstream
15. Which of the following denote incorrect data type in C++?

Answer: real
16. When object of the first class is instantiated then which of the following is called?

Answer: Constructor
17. The block of memory allocated by the new is released by using

Answer: delete
18. The first fully Object-oriented language is

Answer: Simula
19. The function named as exforsys declared as int exforsys(float x, double y) has return
type as

Answer: int
20. A function in a C++ program can be called

Answer: Any number of times

Incorrect Questions (10 / 30)


1. Which of the following statements are TRUE?

Answer: Reference variables must be initialized in C++


2. What is the value of variable z when the following program segment ends? int z;
for(z=0; z<50; z++) {}

Answer: 50
3. Which of the following OOPS concepts are used with cin and cout?

Answer: Operator Overloading


4. Mutable keyword can be applied to

Answer: Both A and B


5. When dynamically allocated memory is lost to the C++ program then

Answer: memory leak occurs


6. The actual implementation is present in

Answer: definition
7. Which of the following denotes growable array?

Answer: Both A and B


8. Which of the following denote advantages of inheritance?

Answer: Both A and B


9. Inheritance in C++ have default access specifier as
Answer: private
10. A template can be instantiated by

Answer: Both A and B

You might also like