download Mastguru Android App

Question Detail

A variable is defined within a block in a body of a function. Which of the following are true ?

  • It is visible from the point of definition to the end of the program.
  • It is visible throughout the function.
  • It is visible from the point of definition to the end of the block.
  • It is visible throughout the block.
Similar Questions :

1. The objects can directly access ?

  • Public members
  • Private members
  • Both of above
  • None of above

2. Explicit call to a constructor means ?

  • Not providing the construction name at all
  • Is the shorthand method
  • Providing the constructor name explicitly to invoke it
  • Providing the constructor name implicitly to invoke it

3. In C++ Functions can returns ?

  • arrays
  • reference
  • objects
  • all of above

4. Which is more memory efficient ?

  • structure
  • union
  • both use same memory
  • depends on a programmer

5. The antonym of constructor is ?

  • Creator
  • Distinct
  • Destroyer
  • Destructor
Read more from - C++ Programming Questions Answers - Set 2
Post a comment