Home

C++ Programming MCQ Question with Answer

C++ Programming MCQ with detailed explanation for interview, entrance and competitive exams. Explanation are given for understanding.

Download C++ Programming MCQ Question Answer PDF

Question No : 1
Which of the following is true about const member functions?

const members can be invoked on both const as well as nonconst objects
const members can be invoked only on const objects and not on nonconst objects
nonconst members can be invoked on const objects as well as nonconst objects
none of the above

Question No : 2
Which of the following relationship is known as inheritancerelationship?

‘has-a’ relationship
‘is-a’ relationship
association relationship
none of the above

Question No : 3
If class A is friend of class B and if class B is friend of class C, which of the following is true?

Class C is friend of class A
Class A is friend of class C
Class A and Class C do not have any friend relationship
None of the above

Question No : 4
A direct access file is:

A file in which recoreds are arranged in a way they are inserted in a file
A file in which records are arranged in a particular order
Files which are stored on a direct access storage medium
None of the above

Question No : 5
Which of the following is not a component of file system

Access method
Auxiliary storage management
Free integrity mechanism
None of the above

Question No : 6
Which of the following are good reasons to use an object oriented language?

You can define your data types
Program statements are simpler than in procedural languages.
An OO program can be taught to correct its own errors.
It's easier to conceptualize an OO program.

Question No : 7
When a language has the capacity to produce new data type, it is said to be

Reprehensible
Encapsulated
Overload
Extensible