Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


What is scope of a variable? (LOLZ)

Answers were Sorted based on User's Feedback



What is scope of a variable? (LOLZ)..

Answer / 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

What is scope of a variable? (LOLZ)..

Answer / lovly

One of the really big pluses with GOSUB/RETURN is that you
can share variables that are neither global nor restricted
to one piece of code.

With or without that functionality, how about a way to
share variables (with memory of course) between only
certain subs/functions? Something like:
(per function/sub)

"STATIC SHARED as integer namespace_name.variable_name =
0" -OR-
"STATIC SHARED namespace_name.variable_name as integer"

Usage would just be: "variable_name" -- no "." or namespace
prefix.

I think that would be a great addition to FB. Thoughts

Is This Answer Correct ?    2 Yes 5 No

Post New Answer

More C++ General Interview Questions

What are virtual functions in c++?

0 Answers  


What are the benefits of pointers?

0 Answers  


Difference between pass by value and pass by reference?

0 Answers  


What are the differences between a struct and a class in C++?

7 Answers   Amazon, Wipro,


write a corrected statement in c++ so that the statement will work properly. x = y = z + 3a;

0 Answers  


Please explain the reference variable in c++?

0 Answers  


When one must use recursion function? Mention what happens when recursion functions are declared inline?

0 Answers  


What is null pointer and void pointer and what is their use?

0 Answers  


What is Destructor in C++?

0 Answers  


What is difference between c++ and c ++ 14?

0 Answers  


Differentiate between C and C++.

0 Answers   Wipro,


Why do we use iterators?

0 Answers  


Categories