download Mastguru Android App

Question Detail

What is true about Constructor ?

  • Its name is plural of class name.
  • Its name has * symbol before it.
  • Its name is same as of class name.
  • Its name has # symbol before it.
Similar Questions :

1. int *ptr[5];

  • a pointer of 5 int elements
  • an array of 5 int pointers
  • an array of 5 elements returning an int value
  • none of above

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

  • True
  • False

3. Destructors are called ?

  • not defined
  • in any order
  • in the reverse order of constructor calls
  • in the same order of constructor calls

4. The private data members of a class are accessible ?

  • Directly to objects of that class
  • To any function defined outside a class
  • Only to the member functions
  • Only using keyword static

5. What is true about Constructor ?

  • Its name is plural of class name.
  • Its name has * symbol before it.
  • Its name is same as of class name.
  • Its name has # symbol before it.
Read more from - C++ Programming Questions Answers - Set 2
Post a comment