Top 1,000+ C++ Language Quiz Questions & Answers - 1

Question: 1

A base class

(A) behave badly when chips are down

(B) will be a generalized version of its derived classes

(C) correspond to something in the real world

(D) offer model more specific objects than its derived classes

Ans: B

will be a generalized version of its derived classes

Question: 2

Copy constructor is invoked when a/an

(A) Argument is passed by value

(B) Argument is passed by reference

(C) Function returns for reference

(D) Function returns by value

Ans: D

Function returns by value

Question: 3

A project file

(A) contains instructions for compiling and linking

(B) contains definitions for C++ variables

(C) examines contents of the files in the project

(D) examines contents of the files in the project

Ans: A

contains instructions for compiling and linking

Question: 4

In C++, programs, the keyword friend appears in the

(A) class allowing access to another class

(B) private section of a class

(C) public section of a class

(D) all of these

Ans: D

all of these

Question: 5

The member function can always access the data in

(A) Any object of the class of which it is a member

(B) The public part of its class

(C) The class of which it is member

(D) The object of which is a member

Ans: D

The object of which is a member

Related Questions