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

2. Which is more memory efficient ?

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

3. Which of the following keywords are used to control access to a class member ?

  • protected
  • switch
  • goto
  • for

4. Constructors has return type void ?

  • True
  • False

5. Enumerators are stored by the compiler in ?

  • string
  • integer
  • float
  • any of above
Read more from - C++ Programming Questions Answers - Set 2