Name of the memory location is called variable Generally when we required to change the data of the time of execution then we need to go for variable,
Datatype variable; Datatype var1,var2,var3;
Void main() { Int I; Float f; I=5/2; F=5/2; Printf(“%d %f”,I,f); } o/p: 2 2.000000
Value | Int | Float |
- | Gr | Gr |
5/2 | 2 | 2.000000 |
5.0/2 | 2 | 2.5 |
5/2.0 | 2 | 2.5 |
5.0/2.0 | 2 | 2.5 |
2/5 | 0 | 0.0 |
2.0/5 | 0 | 0.4 |
Operator behaviour is always variable independent i.e Acc to the variable type, the behaviour of the operator will not be changed.
By default, whenever we are declaring any variable, it bolds garbage value initially
You liked the article?
Like : 0
Vote for difficulty
Current difficulty (Avg): Medium
1/15
TekSlate is the best online training provider in delivering world-class IT skills to individuals and corporates from all parts of the globe. We are proven experts in accumulating every need of an IT skills upgrade aspirant and have delivered excellent services. We aim to bring you all the essentials to learn and master new technologies in the market with our articles, blogs, and videos. Build your career success with us, enhancing most in-demand skills in the market.
Stay Updated
Get stories of change makers and innovators from the startup ecosystem in your inbox