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
What is the right type to use for boolean values in c?
Why is extern used in c?
Give me the code of in-order recursive and non-recursive.
Difference between Function to pointer and pointer to function
In this assignment you are asked to write a multithreaded program to find the duplicates in an array of 10 million integers. The integers are between -5000,000 to 5000,000 and are generated randomly. Use 10 threads, each thread works on 1000,000 integers. Compare the time needed to accomplish the task with single thread of execution program. Do not include the time to fill the array with integers in the execution time.
Explain the difference between getch() and getche() in c?
Why static variable is used in c?
What is nested structure in c?
A text file that contains declarations used by a group of functions,programs,or users a) executable file b) header file c) obj file d) .cfile
Why c is a procedural language?
What are the uses of a pointer?
Explain how does free() know explain how much memory to release?
How do I determine whether a character is numeric, alphabetic, and so on?
Explain how can you be sure that a program follows the ansi c standard?
how can i write a program that prints out a box such that whenever i press any key8(coordinate number) on the keyboard, the box moves.