There are 2 printf() functions in this code fragment:
inner printf()
outer printf()
Firstly, the inner printf() will execute and will print 123456789 and then the outer printf() will execute.
It is to be noted that the printf() returns the number of characters that it prints.
Thus, by executing the inner printf(), we have got 9 (because 123456789 are 9 characters), Now, when the outer printf() is executed, 9 is printed.
the inner call happned first it will print 9 number of character.
This answer is as per myknowledge , kindly Correct me if I am wrong.
Also Practice – C Programming GATE Questions