What is the output of the following program?
#include <stdio.h>
int main ()
{
int i=43;
printf ("%d\n", printf ("%d", printf ("%d", I)));
return 0;
}
Reference answer: This program will output 4321. The reason is that the value of the first output I is 43 and then the return value of printf is output! And the return value of printf is the number of characters that are output! So, after the innermost printf ("%d", I) was printed 43, then the return value of printf ("%d", 43) was printed, which was 2, and then the return value of print printf ("%d", 2) was 1. So the final result is 4321.
2. What is the value of M and N after this program is run?
#include <stdio.h>
int main ()
{
int a=4,b=3,c=2,d=1,m=2,n=2;
(m=a<b) && (n=c>d);
printf ("m=%d,n=%d", m,n);
return 0;
}
To read the full text please click on the URL C language
Today to share a few questions about several C languages