c - What conversion happens in the following expression? -


in following expression, conversion happens?

long long a; long long b; double c; b=a*c; 

suppose long long type 8-byte.

if a , b both int, in expression b = * c, a converted double , multiplication c, , result converted int , assigned b.

is assumption correct?

b=a*c; 

is equivalent to:

b=(long long) ( (double)a * c ); 

so there 2 conversions involved, first long long double , second double result long long

for more details check this page joachim pileborg's comment


Comments