First page Back Continue Last page Overview Image
C programming language
Basic C program structure and Hello world.
- # include <stdio.h> – This command is a preprocessor directive in C that includes all standard input-output functions
- int main() – This is the line from where the execution of the program starts. The main() function starts the execution of any C program.
- { (Opening bracket) – This indicates the beginning of any function in the program (Here it indicates the beginning of the main function).
- /* some comments */ – Whatever is inside /*——-*/ are not compiled and executed; they are only written for user understanding or for making the program interactive by inserting a comment
- printf(“Hello World”) –The printf() command is included in the C stdio.h library, which helps to display the message on the output screen.
- return 0 –This command terminates the C program and returns a null value, that is, 0.
- } (Closing brackets)- This indicates the end of the function. (Here it indicates the end of the main function)