Write about the local class and mention its use?



Write about the local class and mention its use?..

Answer / Vishal Sharma

A local class is a class declared inside another function or block. These classes have access to variables within their enclosing scope, making them useful for encapsulating related functionality and reducing complexity of larger programs. They can also help improve efficiency by minimizing name collisions with global or other local names.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C++ General Interview Questions

Explain stack & heap objects?

1 Answers  


There is a magic square matrix in such a way that sum of a column or a row are same like 3 5 2 4 3 3 3 2 5 sum of each column and row is 10. you have to check that matrix is magic matrix or not?

1 Answers   TCS,


Why struct is used in c++?

1 Answers  


What are enumerations?

1 Answers  


When to use Multiple Inheritance?

6 Answers  


int main() { int i ,a[i]; i = 0; a[i] = 10; cout<< a[i] << endl; return 0; } What will be output of this program?

11 Answers   HCL, Mphasis,


give me some class & objects examples?

1 Answers  


What is a concrete class?

1 Answers  


Explain about vectors in c ++?

1 Answers  


How to write Multithreaded applications using C++?

2 Answers   Honeywell, TCS, Wipro,


Can we use struct in c++?

1 Answers  


What is data hiding c++?

1 Answers  


Categories