+ 2
Y I can't perform the operation c=(++b)/(++a)in this prgrm...
5 Respostas
+ 2
dt line? and to my understanding of printf, as the parameter of the method, you state your message as a string and include the type of the variable that will be printed then you actually provide the method with the variable you want to print. The variable takes the place of the type you have stated, hence why c is neededm
To be honest I have only used it myself once in Java so I need to gain a solid understanding of it.
+ 1
That line isn’t causing the problem:
printf ("the value of c is %d");
Is.
You forgot to put c in that line:
printf ("the value of c is %d", c);
+ 1
printf ("the value of c is %d",c);
Which returns 1 which is to be expected as 3/2 = 1 (Integer division )
+ 1
wats the concept behind putting c into dt line...I m sm times confused in it...
+ 1
I hv to knw the concepts? ...fr putting c there in dt line