Can the main()
function be declared static
in a C program? If so then what is the use of it?
Is it possible if I use assembly code and call
C has two meanings for 'static'...
static for a local variable means it can be used globally. static for a global variable means is can only be used in the current file.
static for functions has the exact same impact as denoting a global variable as static ... the static function IS ONLY VISIBLE IN THE CURRENT FILE ...
Thus main can NEVER be static, because it would not be able to serve as the primary entry point for the program.