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
Explain what are preprocessor directives?
any function have arguments one or more OR not . it is compulsary a) any function compulsary have one or more arguments b) any function did not have arguments. It is not compulsary c) it is optional it is not compulsary d) none of the above
Add Two Numbers Without Using the Addition Operator
How can I read data from data files with particular formats?
Why c is a procedural language?
Without Computer networks, Computers will be half the use. Comment.
find the sum of two matrices and WAP for it.
What is chain pointer in c?
A global variable when referred to in another file is declared as this a) local variable b) external variable c) constant d) pointers
What are the advantages of Macro over function?
What is array of structure in c?
what is the significance of static storage class specifier?
What happens if a header file is included twice?
How to write a code for reverse of string without using string functions?
How do shell structures work?