+ 1
If we typecast a variable in #c will it change the data type of the variable temporarily or for the whole program?
float a=2.3; int b=(int) a; now, here what will be a's data type?
2 Réponses
+ 9
You cast the float to int for that instance. The float variable remains a float variable afterwards.
+ 2
Verify it using sizeof()