How do I use implicit and explicit casts?

Posted by user292489 on Stack Overflow See other posts from Stack Overflow or by user292489
Published on 2010-03-16T02:18:53Z Indexed on 2010/03/16 5:46 UTC
Read the original article Hit count: 189

Filed under:
|
int a = 2, b = 3;
float f = 2.5;
double d = -1.2;

int int_result;
float real_result;

real_result = a * f;
real_result = (float) a * b;
d = a + b / a * f;
d = f * b / a + a;

© Stack Overflow or respective owner

Related posts about c

    Related posts about homework