download Mastguru Android App

Question Detail

Which among following is correct way of declaring object of a class ?

  • Classname Objectname;
  • Class Classname Objectname;
  • Class Classname Object Objectname;
  • Classname Object Objectname;
Similar Questions :

1. The process of deriving a class from another derived class is known as ?

  • single inheritance
  • dual inheritance
  • multiple inheritance
  • multilevel inheritance

2. Constructors has return type void ?

  • True
  • False

3. We can do constructor overloading in C++ ?

  • True
  • False

4. 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

5. The advantage of declaring a virtual function as pure is
?

  • programs runs faster
  • early binding can be achieved
  • you force any derived class to define its own implementation
  • you can avoid making the class an abstract class
Read more from - C++ Programming Questions Answers - Set 2
Post a comment