Basic of c language
The general syntax of c language is-
#include <stdio.h>
int main()
{
}
Firstly we should know about the data type
There are several data type
1.int
Int is used for integer variable
2.char
Char is used for char value
3.float -
Float is used for decimal value
Basically they define what type of data .And then do operation on it.
Variables -
Variable is a word that store value.
Header file-
For example-
#include <stdio.h>
It means that what type of operation
We do and that operation is define in that header file
Terminating semicolons-
; Is mean that statement is end.
Int main( )
Is should be added in every c program.
Size of data type-
| Type | Storage size | Value range |
|---|---|---|
| char | 1 byte | -128 to 127 or 0 to 255 |
| unsigned char | 1 byte | 0 to 255 |
| signed char | 1 byte | -128 to 127 |
| int | 2 or 4 bytes | -32,768 to 32,767 or -2,147,483,648 to 2,147,483,647 |
| unsigned int | 2 or 4 bytes | 0 to 65,535 or 0 to 4,294,967,295 |
| short | 2 bytes | -32,768 to 32,767 |
| unsigned short | 2 bytes | 0 to 65,535 |
| long | 4 bytes | -2,147,483,648 to 2,147,483,647 |
| unsigned long | 4 bytes | 0 to 4,294,967,295 |
Keywords-
Keywords is that word whose meaning is already define in c .| Keywords in C Programming | |||
|---|---|---|---|
| auto | break | case | char |
| const | continue | default | do |
| double | else | enum | extern |
| float | for | goto | if |
| int | long | register | return |
| short | signed | sizeof | static |
| struct | switch | typedef | union |
| unsigned | void | volatile | while |





