How are header files managed during compilation in C?
Headers in C/C++ are just like code.Every #include will get replaced by actual header code.So it is a good must to always have your header within #include guard, this will avoid duplicating of header file code and thus avoid compilation errors also due to duplicate symbols. If you are including unnecessary header files, compiler will has include all those in code (unnecessary increase in size of binary) while compilation and all symbols will be added to symbol table of binary/library.