1 year ago

#354538

test-img

Codemaster2022

How to print the sum of int and double in C?

What am I doing wrong here in C, because if I run the following code I get only 0.000000 instead of 20.5?

int testInt= 10;
double testDouble = 10.5;
auto testSum = testInt + testDouble;

printf("%lf\n",&testSum);

c

types

sum

addition

mixed

0 Answers

Your Answer

Accepted video resources