Structure in c programming:-
C supports following program structure
- Preprocessor Commands
- Functions
- Variables
- Statements & Expressions
- Comments
Lets start with simple code :-
#include<stdio.h>
int main()
{
printf("Hello, Devesh\n");
return 0;
}
Note:-
#include<stdio.h> :-It is a standard for input / output, which allows us to use some commands which includes a file called stdio.h
int/void main():-It is the main function where program execution begins.Each C program must contain only one main function.
Curly braces:-Two curly brackets "{.......}" are used to group all statements in the program.
printf():- It is a function in C, which displays text on the screen.