Question: If a local class is defined in a function, what is true for an object of that class?

  1. The object can be accessed, declared, and used locally in that function.
  2. The object must be declared inside any other function.
  3. The object is temporarily accessible outside the function.
  4. The object can call all the other class members anywhere in the program.

Answer: The correct answer of the above question is Option A:The object can be accessed, declared, and used locally in that function.