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 antonym of constructor is ?

  • Creator
  • Distinct
  • Destroyer
  • Destructor

2. What is data hiding ?

  • It is related with hiding internal object details
  • It is related with showing internal object details
  • It is related with datatypes
  • None of above

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

  • Private
  • Public
  • Protected
  • Depends

4. Which of following valid option will not return a value in c++ ?

  • free
  • void
  • empty
  • null

5. Which variables cannot be declared ?

  • structure
  • pointer
  • class
  • void
Read more from - C++ Programming Questions Answers - Set 2