C Program Structure
The 1.C program mainly includes the following sections:
Preprocessor directives
Function
Variable
Statements & Expressions
Comments
2. #include <stdio.h>
int main ()
{
/* My first C program */
printf ("Hello, world! \ n ");
return 0;
}
Next we explain the above procedure:
The first line of the program #include <stdio.h> is the preprocessor directive, which tells the C compiler to include the Stdio.h file before actually compiling it.
The next line of int main () is the main function, where the program starts execution.
The next line of/*...*/will be ignored by the compiler, where the program's comment content is placed. They are referred to as notes to the program.
The next line of printf (...) is another available function in C that displays the message "Hello, world!" on the screen.
The next line return 0; Terminates the main () function and returns the value 0.
C Basic Knowledge "program Structure"