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 are local and global variables?

Answer Posted / ashish

Local:-
These variables only exist inside the specific function that
creates them. They are unknown to other functions and to the
main program. As such, they are normally implemented using a
stack. Local variables cease to exist once the function that
created them is completed. They are recreated each time a
function is executed or called.

Global:-
These variables can be accessed (ie known) by any function
comprising the program. They are implemented by associating
memory locations with variable names. They do not get
recreated if the function is recalled.

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are runtime error?

1115


Why doesnt this code work?

1047


Is main is user defined function?

1119


Is r written in c?

1143


the maximum length of a character constant can be a) 1 character b) 8 characters c) 256 chaacters d) 125 characters

2285


what is the differnce between programing langauge and tool? is sas is a programing langauge r tool?

2360


void main(){ int a; a=1; while(a-->=1) while(a-->=0); printf("%d",a); }

1706


What are the different types of constants?

1061


how to find binary of number?

4411


Can we replace the struct function in tree syntax with a union?

1287


Explain what math functions are available for integers? For floating point?

1094


why return type of main is not necessary in linux

2089


What is the right type to use for boolean values in c?

1017


to find the closest pair

2314


What is static and volatile in c?

1209