#include <stdio.h> int main(void) { printf("%d",printf("hello")); return 0; } code
printf
function returns an integer that is the total numbers of characters printed by the function.
In your program, the inner printf
function prints the string hello and returns the number of characters printed i.e. 5. Then the outer printf
function prints this integer 5. Therefore, the overall output is hello5.