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 : 29
A member function can always access the data

In the object of which it is a member
In the class of which it is a member
In the object of the class of which it is a member
In the public part of its class

Question No : 30
Classes are useful because they

Are removed from memory when not in use
Permit data to be hidden from other classes
Bring together all aspects of an entity in one place
Can closely model objects in the real world

Question No : 31
Element double Array[7] is which element of the array?

sixth
seventh
eighth
impossible to tell

Question No : 32
You can read input that consists of multiple lines of text using

The normal cout<< combination
The cin.get() function with one argument
The cin.get() function with two argument
The cin.get() function with three argument

Question No : 33
Operator overloading is

Making C++ operators work with objects
Making C++ operators more then they can handle
Giving new meaning to existing c++ operators
Making new C++ operators

Question No : 34
Private data members can be accessed

Only from the base class itself
Both from the base class and form its derived classes
From the class which is a friend of the base class
None of the above is correct

Question No : 35
Protected data members can be accessed

Only from the base class itself
Both form the base class and from its derived classes
From the class which is friend of the base class
None of the above are correct