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?

Answers were Sorted based on User's Feedback



What are local and global variables?..

Answer / udayakumar

local variables are the variables which are declared with in
a function and the scope of that variables are only within
that function.Global variables are the variables which are
declared globally.Since it is declared globally it can
accessible to all the functions inside the program...

Is This Answer Correct ?    3 Yes 0 No

What are local and global variables?..

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

What are local and global variables?..

Answer / pushpendra

local variable:-its uses inside the function that is these variable exist inside the function and other fu no access out side the main function.
while global variables are variables and which are declared both sides of function inside and outside that is globally.all functions can access out of main function.

Is This Answer Correct ?    1 Yes 0 No

Post New Answer

More C Interview Questions

how to make c program without a libary? e.g.#include<stdio.h> libary is not in c progaram.

2 Answers  


How do you use a 'Local Block'?

0 Answers   Ericsson,


What functions are used in dynamic memory allocation in c?

0 Answers  


Explain what are the standard predefined macros?

0 Answers  


write a program in c language for the multiplication of two matrices using pointers?

8 Answers   Ignou,


why little endian and big endian came?y they using differently? y they not used commonly ?wt is application of little and big ?

1 Answers  


what is the height of tree if leaf node is at level 3. please explain

0 Answers  


wap in c to accept n number display the highest and lowest value

2 Answers  


State two uses of pointers in C?

0 Answers   Aspire, Infogain,


Why are some ANSI/ISO Standard library routines showing up as undefined, even though I've got an ANSI compiler?

0 Answers   Celstream,


Hi Every one......... Please Any body give me the answer for my question. Is it possible to print the word "PRINT F", without using printf() statement in C-Language.

4 Answers  


any function have arguments one or more OR not . it is compulsary a) any function compulsary have one or more arguments b) any function did not have arguments. It is not compulsary c) it is optional it is not compulsary d) none of the above

0 Answers  


Categories