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 default scope for a structure ?

  • Private
  • Protected
  • Public
  • None of aobve

2. An explicitly defined destructor function

  • may be virtual
  • may not be virtual
  • will always be virtual
  • will never be virtual

3. What is object in C++ ?

  • Object is part of syntax of a class.
  • Object is datatype of a class.
  • Object is an instance of a class.
  • Object is function of a class.

4. 37. Which of the following statements is false ?

  • Using typedef does not replace the standard C++ data type name with the new name
  • The new name defined by typedef, can be used as a type for another typedef
  • typedef defines new data types
  • None of the above

5. Data members and member functions are enclosed within ?

  • union
  • structure
  • class
  • array
Read more from - C++ Programming Questions Answers - Set 2