adplus-dvertising
frame-decoration

Question

Can local class members access/use the general local variables (except static, abstract etc.) of the function in which it is defined?

a.

Yes, it can access with arrow operator

b.

No, it can’t access with dot operator

c.

Yes, it can access using dot operator

d.

No, it can’t access In anyway

Answer: (d).No, it can’t access In anyway

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. Can local class members access/use the general local variables (except static, abstract etc.) of the function in which it is defined?

Similar Questions

Discover Related MCQs

Q. Which type of data can a local class access from the function in which it is defined?

Q. Local classes can access the type names and enumerators defined by the enclosing function.

Q. Can static variables be declared inside a local class?

Q. All the member functions of local classes are __________ by default.

Q. The enclosing function has no special access to the members of local class. (True/False)

Q. Which language can use inheritance with local classes?

Q. How many local classes can be defined inside a single function?

Q. All the data members of local class must be ___________

Q. Can two different functions have local class with same name?

Q. What is the scope of local class?

Q. Can a function, other than the enclosing function of local class, access the class members?

Q. Which among the following is main advantage of using local classes?

Q. Which among the following best describes a nested class?

Q. Which feature of OOP reduces the use of nested classes?

Q. How many categories are nested classes divided into?

Q. Non-static nested classes have access to _____________ from enclosing class.

Q. Static nested classes doesn’t have access to _________________ from enclosing class.

Q. The nested class can be declared ___________________

Q. Use of nested class ____________ encapsulation.

Q. Which among the following is correct advantage/disadvantage of nested classes?