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 |
write a progam to display the factors of a given number and disply how many prime numbers are there?
What is difference between constant pointer and constant variable?
What is static function in c?
Can we access RAM? How? Whats the range of access? Similarly What are other hardware we can access?
wt is d full form of c
implement general tree using link list
what are bit fields? What is the use of bit fields in a structure declaration?
0 Answers Flextronics, TISL, Virtusa,
How to set file pointer to beginning c?
What do you mean by dynamic memory allocation in c?
why should i select you?
write a c program for greatest of three numbers without using if statment
what is out put of the following code? #include class Base { Base() { cout<<"constructor base"; } ~Base() { cout<<"destructor base"; } } class Derived:public Base { Derived() { cout<<"constructor derived"; } ~Derived() { cout<<"destructor derived"; } } void main() { Base *var=new Derived(); delete var; }