The following program, what is the output result?
#include <stdio.h>
int main() {
int i = 43;
printf("%d\n",printf("%d",printf("%d",i)));
return 0;
}
Original series source: Several classic interview questions in C language under Linux
The answer is 43 2 1
Explanation: printf("%d", i) has a return value and returns the number of outputs
The above code can be converted to: