download Mastguru Android App

Question Detail

What is object in C++ ?

  • Object is part of syntax of a class.
  • Object is datatype of a class.
  • Object is an instance of a class.
  • Object is function of a class.
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. The derived class constructor

  • never passes any values to base class constructor
  • can pass arguments only to one base class constructor function
  • is responsible for passing the entire test of arguments needed by base class constructors
  • none of above

3. How we can define member function outside the class ?

  • Using union
  • Using structure
  • Using pointers
  • Using scope resolution

4. When one class inherits from the base class, then the original class is called ?

  • derived class
  • base class
  • sub class
  • basic class

5. How we can access data members using objects ?

  • object@datamember
  • object*datamember
  • object->datamember
  • object.datamember
Read more from - C++ Programming Questions Answers - Set 2
Post a comment