C Programming Professional Made easys (2015)
Chapter 3 Understanding C Program
The C program has several features and steps in order for an output or function is carried out.
Basic Commands (for writing basic C Program)
The basic syntax and commands used in writing a simple C program include the following:
This command is a preprocessor. <stdio.h> stands for standard input output header file. This is a file from the C library, which is included before the C program is compiled.
Execution of all C program begins with this main function.
This symbol is used to indicate the start of the main function.
This indicates the conclusion of the main function.
Anything written in between this command will not be considered for execution and compilation.
The printf command prints the output on the screen.
Writing this command would allow the system to wait for any keyboard character input.
Writing this command will terminate the C program or main function and return to 0.
A basic C Program would look like this:
/* Our first simple C basic program */
printf(“Hello People! “);
The output of this simple program would look like this: