Multiple choice technology programming languages

What is the output of following code snippet ? void main() { printf(printf("anna")); }

  1. anna

  2. compile time error

  3. anna4

  4. non of the above

  5. garbage

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

printf("anna") prints "anna" and returns 4 (the count of characters printed). The outer printf then prints this return value, resulting in the output "anna4".