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

What do you mean by late binding?

607


What is a string example?

538


Can I have a reference as a data member of a class? If yes, then how do I initialise it?

693


Is c++ built on c?

554


What does override mean in c++?

571






Define a conversion constructor?

599


When we use Abstract Class and when we use Interface?where we will implement in real time?

1655


Which is better turbo c++ or dev c++?

550


What is ifstream c++?

544


What are the benefits of c++?

554


What is oop in c++?

587


Can I create my own functions in c++?

582


What's the order in which the objects in an array are destructed?

834


What is the advantage of c++ over c?

549


Explain how functions are classified in C++ ?

793