what is the variable in c and types of variables ? data types in c and their size ,
variable and data types in c |
5} Types Of Variables In C Language :-
Variable :- Variable Is Changeable Value During The Program Execution.
variable is name of given to memory location that a value in allocated memory location.
Variable Categrise In Two Types
- Local Variable .
- Global Variable.
1) Local Variable :- Local Variable Which Declare With Any Function Are Called Local Variable.
- Local Variable Are Store The Value Temporarily.
- These Variables Are Only Accessed By The Function In Which Thay Are Declared.
2) Global Variable :- Global Variable Are Declared Above Any Function Is Called Global Variable.
- These Variable Are Accessed By Any Function In The Program.
- Default Value Of Global Variable Is Zero.
6} Data Types In C Programming :-a
Data Types :- Are Used For Types Declaration For Variable And Size Declaration For Variable.
data types in c programming |
1]
Integer :- Integer Data Type Used For To Store Data In Numerical Value Without
Decimal Point In A Variable.
Ex
:
int
a = 28 ;
b = 80 ;
k = 30;
s = 5 ;
data types and sizes in c |
2] Float :- Float Data Type Used For To Store Data In Numerical Value With Decimal Point In A Variable.
Ex :
float a = 25.23;
b = 80.65;
d = 954.325;
data types and sizes in c |
3] Character :- Character Data Type Store A Alphanumeric Values In A Variable.
Ex
:
Char ‘ x ’ , ‘ y ’ , ‘ z ‘ , ‘ 2 ‘ , ‘ / ‘ , ' s ' , ' + ' , ' * ' ;
data types and sizes in c |
Comments
Post a Comment