Yes,we can compile our program without header file without any error,but we can not use any predefine functions like printf,scanf.
The command to compile a Java program is "javac", followed by the class name (file name).
Every library requires a header file (.h file) that can be included in any translation unit that requires access to the library. The header describes the library interface. The library implementation may be provided by a corresponding .c source file in which case you can compile the library into your program just as you would any other translation unit. However, most library implementations are provided by a precompiled library file (.lib file) and you generally won't have access to the source file. The precompiled library file is required by the linker while the corresponding header is required by the compiler.
If we save our program with .c extention before compiling it, the compiler with automatically include the header files. for eg-First we save our program with sum.c and then compile it. It will not show any error.1. Compilation needs header files, not execution.2. Very small example programs can be written without using any header file, eg:/* mini.c */extern void (const char *puts);int main (void){puts ("Hello, world");return 0;}
Header file is a file which is meant to be included into another file during compilation. Examples: string.h, stdio.h, inttypes.h. Header pointer is a pointer to an object called header (for example header of a linked list).
the program contains the which are coding like as our header file ,void main,library function etc.
C programs do not require header files. If you want a C program without header files, you can simply not create them. However, you may or may not be able to include your non-header file source files.
The command to compile a Java program is "javac", followed by the class name (file name).
If you are looking to create an executable (.exe) file on windows then I highly recommend this program to compile your php source code to an exe file.
Every library requires a header file (.h file) that can be included in any translation unit that requires access to the library. The header describes the library interface. The library implementation may be provided by a corresponding .c source file in which case you can compile the library into your program just as you would any other translation unit. However, most library implementations are provided by a precompiled library file (.lib file) and you generally won't have access to the source file. The precompiled library file is required by the linker while the corresponding header is required by the compiler.
For example: int main (void) { return 0; }
#include or#include "nameoftheader"
No. Header files are those which contains declaration part of function & library files are those which contains definition part of function. These are those functions which we called in our program by using header files.
If we save our program with .c extention before compiling it, the compiler with automatically include the header files. for eg-First we save our program with sum.c and then compile it. It will not show any error.1. Compilation needs header files, not execution.2. Very small example programs can be written without using any header file, eg:/* mini.c */extern void (const char *puts);int main (void){puts ("Hello, world");return 0;}
Just open the file, read-in N bytes and then examine (parse) for known header values or signature.
Having saved the source file (*.C), you can compile it into an object module (*.OBJ), then link an executable program (*.EXE)
Classes and structures can be put in a header file the same way you would use them in a main program; the only difference is that they are placed in a separate file, called a header file. Then, after creating a new file, include that new file with the definition by the use of the preprocessor #include statement.
Header file is a file which is meant to be included into another file during compilation. Examples: string.h, stdio.h, inttypes.h. Header pointer is a pointer to an object called header (for example header of a linked list).