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 |
What is pass by reference in functions?
Why structure is used in c?
hi , please send me NIC written test papers to sbabavalli@gmail.com
a memory of 20 bytes is allocated to a string declared as char *s then the following two statements are executed: s="Etrance" l=strlen(s); what is the value of l ? a.20 b.8 c.9 d.21
State the difference between x3 and x[3].
main() { printf(5+"Vidyarthi Computers"); }
If "AaBbCc" is passed to the char char x(*a) { a[0]?x(a+1):1; printf("%c",a[0]); return 1; } what will be the output?
Where we use clrscr in c?
How can I ensure that integer arithmetic doesnt overflow?
How can I automatically locate a programs configuration files in the same directory as the executable?
code for reverse alternate words from astring
Why malloc is faster than calloc?