Frequently Asked C Language Interview Question & Answers

What does static variable mean?

A static variable is available to a C application, throughout the lifetime of the program. At the time of starting the program execution, static variables allocations take place first. In a scenario where one variable is to be used by all the functions (which is accessed by main () function), then the variable need to be declared as static in a C program.