Structure and Basic Syntax of C Program
There are following parts in a C program: Preprocessor Commands Functions Variables Statements & Expressions Comments For example, we can consider following simple code which will print the words "Hello World" : #include <stdio.h> int main() { /* my first program in C */ printf("Hello, World! \n"); return 0; } Above program contains following parts: The first line of the program #include <stdio.h> is a preprocessor command, which instructs a C compiler to include stdio.h file before going to actual compilation. The next line int main() is the main function where the program execution starts. The next line /*...*/ will be ignored by the compiler and it has been put to add additional comments in the program. Therefore, these lines are called comments in the program. The next line printf(...) is another function available in C which generates the message "Hello, World!" to be displayed on the screen. The next line return