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
Why can arithmetic operations not be performed on void pointers?
What is assignment operator?
How can I do serial ("comm") port I/O?
What does == mean in texting?
What is meant by keywords in c?
How can you increase the allowable number of simultaneously open files?
Tell me what are bitwise shift operators?
Who is the main contributor in designing the c language after dennis ritchie?
Explain how can I right-justify a string?
How do I convert a string to all upper or lower case?
What is volatile variable how do you declare it?
What is the benefit of using const for declaring constants?
Is it better to use malloc() or calloc()?
What is pragma in c?
How do you view the path?