Featured
- Get link
- X
- Other Apps
Basic Syntax of C program
#include <stdio.h>
int main(){
printf("Hello world");
return 0;
}
The above program is one of simplest program that is written in C language. Let's understand the each line.
#include <stdio.h>
This statements which begins with # sign are directives for the preprocessor. These statements are processed before the program is compiled. Preprocessor handles these directives. Preprocessor directive shown above attaches the code of the header file stdio to your program. Header files are those files which contain all the information that is required to make use of the C libraries.
int main()
From her the main function starts. The main() function is the point from where all C programs begins their execution. The content of main() function is alway executed first. The content are written inside the '{' and '}'.
printf("Hello world");
This lines displays the message. printf() statement is used to display message. Every executable statement in C must be terminated by semicolon ;
return 0;
It means that the function doesnot return any value.
- Get link
- X
- Other Apps
Popular Posts
Changing text into voice using Javascript just in browser's console
- Get link
- X
- Other Apps
Comments
Post a Comment