+ 5

Why isn't output coming?

swapping program https://code.sololearn.com/ceek43rKIoTL/?ref=app

23rd Oct 2018, 8:55 PM
Abhay
Abhay - avatar
3 Réponses
+ 3
You did not put the format specifiers in the printf string. Correct code is: printf("values after swapping : %d %d",a,b); Format specifiers are used to let the computer know which data type should be printed in this case.
23rd Oct 2018, 8:59 PM
Angelo
Angelo - avatar
+ 3
sorry, my mistake I forgot to and thks :-)
23rd Oct 2018, 9:03 PM
Abhay
Abhay - avatar
+ 1
The second print statement You forgot %d... printf("values after swapping : %d %d",a,b);
23rd Oct 2018, 9:02 PM
Megatron
Megatron - avatar