First C Program and its Structure Lets see how to write a simple and most basic C program: #include < stdio . h > int main ( ) { printf ( "Hello,World" ) ; //single line comment return 0 ; /* multi line comments /* } Hello,World Different parts of C program Pre-processor Header file Function Variables Statements & expressions Comments All these are essential parts of a C language program. Pre-processor #include is the first word of any C program. It is also known as a pre-processor . The task of a pre-processor is to initialize the environment of the program, i.e to link the program with the header files required. So, when we say #include <stdio.h> , it is to inform the compiler to include the stdio.h header file to the program before executing it. Header file A Header file is a collection of built-in(readymade) functions, which we can directly use in our program. Header files contain def...
Comments
Post a Comment