Home
Current Affairs January 2024

What is the correct answer?

4

A pure virtual function is a virtual function that has

A. no definition in its base class

B. a definition in its base class

C. a definition in at least one derived class

D. definition in base class and at least one derived class

Correct Answer :

A. no definition in its base class


Related Questions

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

Dynamic memory can be allocated by the following declaration

A. new

B. volatile

C. static

D. ==

What is the correct answer?

4

Delete operator is used

A. To allocate storage

B. To deallocate storage

C. To delete variable name

D. None of the above are correct

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

A pure virtual function is a virtual function that has

A. no definition in its base class

B. a definition in its base class

C. a definition in at least one derived class

D. definition in base class and at least one derived class

What is the correct answer?

4

The value of 'this' pointer can be changed.

A. True

B. False

What is the correct answer?

4

Sharing of common information are achieved by the concept of

A. Virtual copying

B. Inheritance

C. Encapsulation

D. None of these

What is the correct answer?

4

The characteristic that data can be manipulated only through member functions that are part of the class is called

A. Encapsulation

B. Data dependency

C. Inheritance

D. Instantiation

What is the correct answer?

4

"[]" Operator is a unary operator.

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

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

Member function cannot be called from within a constructor.

A. True

B. False

What is the correct answer?

4

Which of the following can legitimately be passed to a function?

A. A constant

B. A variable

C. A structure

D. A header file

What is the correct answer?

4

In C++, the stream base class is

A. iostream

B. iofstream

C. ios

D. stdio

What is the correct answer?

4

A base class is inherited by

A. derived class

B. inline function

C. constructor

D. none of the above

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

new operator is used

A. To dynamically allocate storage

B. To statically allocate storage

C. To allocate storage for a new variable

D. None of the above are correct

What is the correct answer?

4

A destructor can have a return type.

A. True

B. False

What is the correct answer?

4

The following syntax is valid. void inline gram_ panchayat :: show_gram_ panchayat_info().

A. True

B. False

What is the correct answer?

4

_______ argument(s) are passed in case of binary overloaded operators.

A. Two

B. One

C. No

D. None of the above

What is the correct answer?

4

this' is an implicit pointer.

A. True

B. False

What is the correct answer?

4

A variable defined within a block is visible

A. From the point of definition onwards in the program

B. From the point of definition onwards in the function

C. From the point of definition onwards in the block

D. Throughout the function

What is the correct answer?

4

A direct access file is:

A. A file in which recoreds are arranged in a way they are inserted in a file

B. A file in which records are arranged in a particular order

C. Files which are stored on a direct access storage medium

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

In a class, only the member function can access data, which is not accessible to outside. This feature is called:

A. Data security

B. Data hiding

C. Data manipulation

D. Data definition

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

The && and || operators

A. Compare two numeric values

B. Combine two numeric values

C. Compare two Boolean values

D. Combine two Boolean values

What is the correct answer?

4

Operator overloading is

A. Making C++ operators work with objects

B. Making C++ operators more then they can handle

C. Giving new meaning to existing c++ operators

D. Making new C++ operators

What is the correct answer?

4

The signature of a function is

A. The return type

B. The number and type of arguments

C. The class of a function

D. None of the above

What is the correct answer?

4

iostream is inheried from istream, ostream and ios class.

A. True

B. False