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 diff between localstatic and globalstatis variable
possible 2 use in another file...?

Answers were Sorted based on User's Feedback



what is diff between localstatic and globalstatis variable possible 2 use in another file...?..

Answer / abdur rab

Local Static
============
The scope of the variable is only within the function where
it is declared, throughout the program. ie the value is
preserved until the end of the program.


Global Static
=============
The scope of the variable is only within the file where it
is declared, throughout the program. ie the value is
preserved until the end of the program.

Global Static variables are not visible outside the files
where they are declared.

Is This Answer Correct ?    8 Yes 0 No

what is diff between localstatic and globalstatis variable possible 2 use in another file...?..

Answer / guest

localstatic belong to that only that function .
globalestatic belong 2whole file. not possible.

Is This Answer Correct ?    6 Yes 1 No

Post New Answer

More C Interview Questions

If the static variable is declared as global, will it be same as extern?

1 Answers   Samsung,


What is derived datatype in c?

0 Answers  


Define recursion in c.

0 Answers  


How do you define structure?

0 Answers  


What is enumerated data type in c?

0 Answers  


Program to find the value of e raised to power x using while loop

5 Answers   IBM, N Tech,


Explain how can type-insensitive macros be created?

0 Answers  


Can you subtract pointers from each other? Why would you?

0 Answers  


Create a simple code fragment that will swap the values of two variables num1 and num2.

0 Answers  


What is dynamic memory allocation?

0 Answers  


How many bytes are occupied by near, far and huge pointers (dos)?

0 Answers  


How to find a missed value, if you want to store 100 values in a 99 sized array?

0 Answers   Honeywell, Zomato,


Categories