Can static variables be declared in a header file?
Answer / Prem Sagar
No, static variables cannot be directly declared in a header file. Static variables have internal linkage, meaning they exist only within the source file where they are defined. However, you can declare them as `extern static` in the header file and define them in each corresponding source file.
| Is This Answer Correct ? | 0 Yes | 0 No |
What is a floating point in c?
Why main function is special give two reasons?
What is sizeof return in c?
How can I read data from data files with particular formats?
What is assignment operator?
write a program to display the numbers having digit 9 in the given range from 1 to 100
1 What is a Data Structure?
What is build process in c?
When should a type cast not be used?
Can a function be forced to be inline? Also, give a comparison between inline function and the C macro?
What is the best way to store flag values in a program?
In which category does main function belong??