0
What is the value assigned to numerous in the statement: double num =5/2; ? Explain the concept of variable casting and show how
3 Respuestas
+ 7
@Babak
Sorry, and thanks for that. Deleting my answers not to confuse
+ 2
5 / 2 result is 2, but 5.0 / 2.0 is gonna be 2.5
for more info see:
http://www.cprogramming.com/tutorial/lesson11.html
+ 2
@ Dinmukhamed Despite the nature of double or float types, the rValue determines how the lValue is going to behave. So, Please test it with 5, 5.0 , and 5.0f.