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 the different types of objects used in c?

972


Write a code to determine the total number of stops an elevator would take to serve N number of people.

1188


What is the use of function in c?

1142


What is a substring in c?

998


what is ur strangth & weekness

2329


What are c identifiers?

1039


What’s the special use of UNIONS?

1106


What is binary tree in c?

1037


provide an example of the Group by clause, when would you use this clause

2128


What are loops c?

997


Which type of language is c?

1021


Write a program to swap two numbers without using third variable?

1247


Does c have function or method?

943


What is void pointers in c?

958


Which one would you prefer - a macro or a function?

1034