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

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. A virtual base class ?

  • is qualified as virtual in base class definition.
  • do not qualified as virtual in base class definition.
  • allows to inherit more than one copy of the base class members.
  • strict the path of inheritance.

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

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

5. Which variables cannot be declared ?

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