Yes.
Why not just try it?.
This is standard C. Implicit type conversion will take place. So x=y will work, as will y=x (the latter will 'lose' the fractional part).
Best Wishes
golf Guest
Posted: Mon May 26, 2008 3:37 am
x is int so, you will lose fractional part;
if you are unsure of the behaviour of the compiler you can make a casting
x = (int)y;
variable y will be integer and assigned to x (compiler makes this by default)
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum