Variable in C language
#Variable :- Vairiable is dwfine as a givwn to memory location. Where value will be store. Syntex of declaring variable is -
EXAMPLE:-
Data type variable ;
⇩⇩ ⇩⇩
int A
Before using the variable in C - program we must 1st declear the variable . The variable is decleard clearlly indicate the data type . The memory amount consumed by a variable depend upon the data type of variable .
Eg:- int ⇒2 byte
float ⇒ 4 byte
char ⇒ 1 byte
➤Declaration and Initialization of structure in C
The main purpose of variables is to store tha data in memory. we know that constants will not change during the program execution . However , its value may be changed during execution time.
⧪Variable Declaration:-
The syntex for variable declaration is below-
the variable_name;
or
type variable_name , variable_name;
For Example:-
int a,b,c,d;
float e;
double f:
→Here ,a,b,c,d,e,f are variables . The int , float, double are the data types.
⧪Variable Initialization:-
The syntex for variable Initialization is below-
Data type variablename=value;
For Example:-
best
ReplyDelete