What is scope of a variable? (LOLZ)

Answer Posted / aboelella

Variable scope is the places in code where this variable can
be accessed

Varaible can be defined to be global (visible in the program
include scope)

Variable can be local if defined in the scope of parantesis
(inside function or in compound statement)

In classes variables scope depends on the way it is defined
(privat, public or protected)

Is This Answer Correct ?    21 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Write bites in Turbo c++ Header ("Include") Files.

920


How can virtual functions in c++ be implemented?

816


What is pure virtual function? Or what is abstract class?

798


What are the differences between new and malloc?

813


What are multiple inheritances (virtual inheritance)?

792


If a function doesn’t return a value, how do you declare the function?

810


What apps are written in c++?

796


What is the difference between an array and a list?

769


What is an adjust field format flag?

869


What is the use of seekg in c++?

792


Why we use #include conio h in c++?

785


Differentiate between an external iterator and an internal iterator?

781


Explain linear search.

821


What is set in c++?

822


Is map sorted c++?

722