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. In C++ Functions can returns ?

  • arrays
  • reference
  • objects
  • all of above

2. When a derived class inherits from many base classes, this process is known as ?

  • multiple inheritance
  • multilevel inheritance
  • default inheritance
  • multiplex inheritance

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

  • True
  • False

4. Which is more memory efficient ?

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

5. The members of a class are ?

b) by default are private
c) are made private by declaring as private
d) none of the above]

  • have no visibility by default
  • public by default
  • private by default
  • protected by default
Read more from - C++ Programming Questions Answers - Set 2