Plz answer my these C doubts-
Q. 1- If i have 3 source files and i declare a static variable in the source file s2.c then which statement is true:-
That static variable is created when the program starts executing and is destroyed when the whole program finishes executing.
OR
That static variable is created when the source file s2.c starts executing and is destroyed when the file s2.c finishes executing.
(I dont want to know abt the scope of the static variable)
Q. 2- Header contains the declarations of functions & variables and in C it is not necessary(even though its safer) to give a prototype of a function before its use in the program. So does it mean that if we dont include a header file which declares a function X(), even then we can use that function(bcoz the header file contains only the prototype of the function, which is not necessary in C).
Q. 3- What do the .obj and .lib files contain?