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 the difference between global variable & static
variable declared out side all the function in the file.

Answer Posted / vishnu

Both the variables are stored in data segment but difference
is in accessing the variable. Global variables can be
accessed though out the project (if multiple files exists)
whereas static variable accessed within the file where its
declared.

Is This Answer Correct ?    15 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is use of null pointer in c?

1055


What is use of bit field?

1349


What are void pointers in c?

1060


What is difference between structure and union in c programming?

1174


What happens if a header file is included twice?

1076


In C programming, what command or code can be used to determine if a number of odd or even?

1093


What are the types of arrays in c?

1236


 write a program that will open the file, count the number of occurences of each word in the the complete works of shakespeare.  You will then tabulate this information in another file.

2283


How to implement a packet in C

2930


What is use of pointer?

1165


What is declaration and definition in c?

1174


how we can make 3d venturing graphics on outer interface

4899


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

1353


Explain why can’t constant values be used to define an array’s initial size?

1398


What is the meaning of typedef struct in c?

1114