Question Detail

What is default visibility mode for members of classes in C++ ?

  • Private
  • Public
  • Protected
  • Depends
Similar Questions :

1. Even if we define a function in a class, then also we need to declare it first.

  • True
  • False

2. An explicitly defined destructor function

  • may be virtual
  • may not be virtual
  • will always be virtual
  • will never be virtual

3. Among following which will give the size of object or type ?

  • Calloc
  • Malloc
  • Sizeof
  • Realloc

4. A virtual base class ?

  • is qualified as virtual in base class definition.
  • do not qualified as virtual in base class definition.
  • allows to inherit more than one copy of the base class members.
  • strict the path of inheritance.

5. The function used to define the task assigned to an operator is ?

  • Virtual function
  • Static function
  • Operator function
  • Friend function
Read more from - C++ Programming Questions Answers - Set 2