C-Language:Keywords,variable,constant,data,data type,user define data type
keywords:-
keywords are predefined words that means keywords are those words whose meaning has already defined in c language they are also known as reserve words.
There are '32' keywords available in c language for example int ,float,char ,long,if ,else,do,for etc .
Variable:-
Variable is an entity (something real words)whose value may change during execution of any program.We create variable to store value in any program.
Syntax for variable declaration in c language is as follow :-
Data type variable_name
int a
a=5 5
a=10 10
Constant:-
A constant is an entity whose value cannot be changed during execution of any program.
Syntax constant declaration in c language is as follows :-
for example const data_type const_name value
const int a =5 5
Data:-
Data means row facts & figures are called data.
Data type:-
Data type are used to specify nature of data it means its size in Bytes its format specifier, its range & type of value it can store.
C language categorized data in 2 types
1.Predefined data type
(Primitive data type) (Fundamental data type)
Name size in Bytes format range
int 2 %d or %i -32.768 to 327.68
float 4 %f -3.4 e`38 to 3.4 e 8
char 1 %c 0 to 127
long 4 % l d -2147486648 to 214783
double 8 %l f 1.7 E -3.8 to 1.1 308
long double 16 %l f 3.4 E - 4932 to 1.1 E+ 493
unsigned int 2 %4µ 0 to 65536
User defined Data type
(non primitive data type )
Array
Structure
Union
Enum




Comments
Post a Comment