What will be the output of the following C code? void main() {
What will be the output of the following C code?
#include <stdio.h>
void main() {
printf("%d", printf("Tata Consultancy"));
}
Show answerHide answer
Correct answer: (C) Tata Consultancy16
Explanation
The inner printf prints "Tata Consultancy" first and returns the number of characters printed, 16 (4 + space + 11). The outer printf then prints 16.