Home
Current Affairs January 2024

What is the correct answer?

4

The template function declaration specifies

A. template class

B. a generic class

C. exception

D. identifier

Correct Answer :

B. a generic class


Related Questions

What is the correct answer?

4

The ?: can be used to replace

A. if-else statement

B. wild cards

C. no meaning in C++

D. returns the value

What is the correct answer?

4

What is the output of the following program segment - for(i = 1, j = 0; i < 10; i++) j += i; cout <<i<<"
";

A. 10

B. 20

C. 55

D. there is an error in the program

What is the correct answer?

4

Overloaded functions

A. Are a group of functions with the same name

B. All have the same number and types of arguments

C. Make life simpler for programmer

D. May fail unexpectedly due to stress

What is the correct answer?

4

A destructor can have arguments like constructor.

A. True

B. False

What is the correct answer?

4

When you overload an arithmetic assignment operator, the result

A. Goes in the object to the right of the operator

B. Goes in the object to the left of the operator

C. Goes in the object of which the operator is a member

D. Must be returned

What is the correct answer?

4

Static data member occurs in only class scope.

A. True

B. False

What is the correct answer?

4

Constructor returns void type value.

A. True

B. False

What is the correct answer?

4

Which of the following relationship is known as inheritancerelationship?

A. ‘has-a’ relationship

B. ‘is-a’ relationship

C. association relationship

D. none of the above

What is the correct answer?

4

Reference to an object behaves like a constant pointer.

A. True

B. False

What is the correct answer?

4

_____________ operator must have one class object

A. +

B. new

C. all

D. None of these

What is the correct answer?

4

A class that contains at least one pure virtual function is called as

A. pure class

B. abstract class

C. base class

D. derived class

What is the correct answer?

4

Objects get destroyed in the reverse order as they are created.

A. True

B. False

What is the correct answer?

4

If a friend function is declared inside a class it can access all data members of the class.

A. True

B. False

What is the correct answer?

4

The binding that binds a function call at run time is called

A. early binding

B. run time binding

C. late binding

D. linking

What is the correct answer?

4

In C++, identifiers have to be declared at the beginning of the blocks.

A. True

B. False

What is the correct answer?

4

A function that is called automatically when an object is destroyed is known as

A. instantiation

B. function prototype

C. constructor

D. destructor

What is the correct answer?

4

The exception is processed using

A. unexpected()

B. perform()

C. catch()

D. try()

What is the correct answer?

4

Element double Array[7] is which element of the array?

A. sixth

B. seventh

C. eighth

D. impossible to tell

What is the correct answer?

4

The value of 'this' pointer can be changed.

A. True

B. False

What is the correct answer?

4

Public data members can be accessed

A. Only from the base class itself

B. Both form the base class and from its derived classes

C. From the class which is friend of the base class

D. None of the above are correct

What is the correct answer?

4

Protected members cannot be inherited.

A. True

B. False

What is the correct answer?

4

A constructor cannot be explicitly called.

A. True

B. False

What is the correct answer?

4

By using protected, one can create class members that are private to their class but

A. that can not be inherited and accessed by a derived class

B. that can still be inherited and accessed by a derived class

C. that can be public

D. none of the above

What is the correct answer?

4

You can read input that consists of multiple lines of text using

A. The normal cout<< combination

B. The cin.get() function with one argument

C. The cin.get() function with two argument

D. The cin.get() function with three argument

What is the correct answer?

4

The break statement causes an exit

A. Only from the innermost loop

B. Only from the innermost switch

C. From all loops and switch

D. Only from the innermost loops or switch

What is the correct answer?

4

The library function exit() causes an exit from

A. The loop in which it occurs

B. The block in which it occurs

C. The function in which it occurs

D. The program in which it occurs

What is the correct answer?

4

:: is known as

A. scope resolution operator

B. global operator

C. Both (a) & (b)

D. None of these

What is the correct answer?

4

Organizing data with methods that operate on the data and creating a new data type is called encapsulation.

A. True

B. False

What is the correct answer?

4

ios containes a pointer to streambuf.

A. True

B. False

What is the correct answer?

4

Inline functions_____________ call overload.

A. Increase

B. Reduce

C. None of the above are correct