Local class - Functions, Features - C++ basic concepts
Q. Which of the followings are false statements about Local class?
1. A local class type name can only be used in the enclosing function
2. All the methods of Local classes must be defined inside the class only
3. A Local class can contain static data members.
4. A Local class may contain static functions.
5. Non-static variables of the enclosing function are not accessible inside local classes.
6. Local classes cannot access global types, variables and functions.
- Published on 17 Jul 15
a. Only 1,3
b. Only 3, 6
c. Only 2 , 4 , 6
d. None of these
ANSWER: Only 3, 6