What is meant by global static? why we have to use static
variable instead of Global variable
Answer Posted / abdur rab
Static remains throughout the program, however its scope is
limited to that file alone. If a program consists of
multiple files, you want a variable to be seen by the
entire file and do not want that variable to be seen by the
other files, then mark is as static
static int a;
as a global variable
| Is This Answer Correct ? | 2 Yes | 3 No |
Post New Answer View All Answers
Write an algorithm for implementing insertion and deletion operations in a singly linked list using arrays ?
Is it better to use malloc() or calloc()?
How arrays can be passed to a user defined function
explain what is an endless loop?
How can you be sure that a program follows the ANSI C standard?
Why cant I open a file by its explicit path?
void main(){ int a; a=1; while(a-->=1) while(a-->=0); printf("%d",a); }
Why is c known as a mother language?
Explain what is the advantage of a random access file?
What are header files? What are their uses?
Explain modulus operator. What are the restrictions of a modulus operator?
Is c a great language, or what?
How can you tell whether a program was compiled using c versus c++?
How we can insert comments in a c program?
Which header file is used for clrscr?