Difference between static global and global?
Answer Posted / sandeep gautham
a program can be spread across two or more files...
so, a global variable can be accessed by all the files..
where as, a static global variable can be accessed only by
the file in which it is declared...static means permanent
and hence the value in static global variable is shared by
all the functions in that file...
Is This Answer Correct ? | 35 Yes | 5 No |
Post New Answer View All Answers
What is the purpose of the "delete" operator?
What is the difference between while and do while loop?
C is to C++ as 1 is to a) What the heck b) 2 c) 10
Can we specify variable field width in a scanf() format string? If possible how?
How are pointers type-cast?
Explain stack & heap objects?
What is the basic structure of c++ program?
Is c or c++ more useful?
Is swift faster than go?
What is difference between n and endl in c++?
How would you find out if a linked-list is a cycle or not?
How would you differentiate between a pre and post increment operators while overloading?
Explain register storage specifier.
Can turbo c++ run c program?
What is &x in c++?