Note of C
1. \n is used to move the control onto the next line.
2. \t is used to give a horizontal tab i.e. continuous five spaces.
3. The different datatypes are int(integer values), float(decimal values)
and char(character values).
some important syntax rules, which you must remember
always while writing code in the C language.
1. A semicolon ; is used to mark the end of a statement and the
beginning of another statement in the C language.
2. C is a case-sensitive language so all C instructions must be
written in lower case letters. main is not the same as MAIN.
LIST OF KEYWORDS IN C
to Double int struct
ak Else long Switch
se Enum register typedef
nst Extern return union
ar Float short Unsigned
ntinue For signed Volatile
fault Goto sizeof Void
If static While
Data Types in C
Broadly, there are 5 different categories of data types in the C
language, they are:
Type Example
Basic character, integer, floating-point, double.
Derived Array, structure, union, etc.
Enumeration Enums
Bool type true or false
Type Example
void Empty value
C Data type Value Range
In the table below we have the range for different data types in the
C language.
Typical Size in
Type Minimal Range
Bits
char 8 -127 to 127 %
unsigned char 8 0 to 255 %
signed char 8 -127 to 127 %
int 16 or 32 -32,767 to 32,767 %
Typical Size in
Type Minimal Range
Bits
unsigned int 16 or 32 0 to 65,535 %
signed int 16 or 32 Same as int %
short int 16 -32,767 to 32,767 %
unsigned short int 16 0 to 65,535 %
signed short int 16 Same as short int %
long int 32 -2,147,483,647 to 2,147,483,647 %
-(263 - 1) to 263 - 1 (Added by C99
long long int 64 %
standard)
signed long int 32 Same as long int %
unsigned long int 32 0 to 4,294,967,295 %
unsigned long long int 64 264 - 1 (Added by C99 standard) %
Typical Size in
Type Minimal Range
Bits
1E-37 to 1E+37 with six digits of
float 32 %
precision
1E-37 to 1E+37 with ten digits of
double 64 %
precision
1E-37 to 1E+37 with ten digits of
long double 80 %
precision