Unable to see how string is printed after the printf in the before line.
#include <iostream>
using namespace std;
int main() {
// your code goes here
char st[] = "CODING";
printf("While printing ");
printf(", the value returned by printf() is : %d", printf("%s", st)
return 0;
}
The output is:
While printing CODING, the value returned by printf() is : 6
printf("While printing ");
n = printf("%s", st);
printf(", the value returned by printf() is : %d", n );
That is, you evaluated the result (and the side effect of seeing something) by calling printf("%s", st) before calling the final printf function to print the result.