The basic syntax for declaring a variable in C is
datatype variablename
Datatype stands for the type of data of the variable it can be an integer,floating point value ,character etc.
The basic thing to understand is datatype specifies the the type of your variable whether it is a number,name or any other type of data.
The primary data types in C are
The range of values which these data types can take are given below in the table
datatype variablename
Datatype stands for the type of data of the variable it can be an integer,floating point value ,character etc.
The basic thing to understand is datatype specifies the the type of your variable whether it is a number,name or any other type of data.
The primary data types in C are
1. | Integer | int |
2. | Character | char |
3. | Floating Point | float |
4. | Double precision floating point | double |
5. | Void | void |
The range of values which these data types can take are given below in the table
Datatype | Range |
char | -128 to 127 |
Int | -32768 to +32767 |
float | 3.4 e-38 to 3.4 e+38 |
double | 1.7 e-308 to 1.7 e+308 |