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

A collection of data with a given structure for excepting storing and providing on demand data for multiple users a) linked list b) datastructer c) database d) preprocessor

1099


Which one to choose from 'initialization lists' or 'assignment', for the use in the constructor?

1088


What is the use of pragma in embedded c?

1061


What are the differences between Structures and Arrays?

1216


What is storage class?

1079


What are file streams?

1020


What are pointers? What are different types of pointers?

1147


Write a program to use switch statement.

1133


Do you have any idea about the use of "auto" keyword?

1085


c language interview questions & answer

1961


What does c in a circle mean?

1079


Write a program to print "hello world" without using a semicolon?

1063


How is actual parameter different from the formal parameter?

1026


How can I write data files which can be read on other machines with different word size, byte order, or floating point formats?

1035


write a c program to find the sum of five entered numbers using an array named number

2144