what is diff between localstatic and globalstatis variable
possible 2 use in another file...?
Answers were Sorted based on User's Feedback
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 |
Answer / guest
localstatic belong to that only that function .
globalestatic belong 2whole file. not possible.
| Is This Answer Correct ? | 6 Yes | 1 No |
If the static variable is declared as global, will it be same as extern?
What is derived datatype in c?
Define recursion in c.
How do you define structure?
What is enumerated data type in c?
Program to find the value of e raised to power x using while loop
Explain how can type-insensitive macros be created?
Can you subtract pointers from each other? Why would you?
Create a simple code fragment that will swap the values of two variables num1 and num2.
What is dynamic memory allocation?
How many bytes are occupied by near, far and huge pointers (dos)?
How to find a missed value, if you want to store 100 values in a 99 sized array?