Multiple choice softskills creativity

Output? #include int a(void); int b(void); int c(void); int sum(int ,int ,int); int a() {printf ("1"); return 1;} int b() { printf("2"); return 2;} int c(){ printf("3"); return 3;} int sum(int a , int b ,int c) { return(a+b+c);} int main() { printf("%d",sum(a(),b(),c())); return 0; }

  1. 123

  2. 6123

  3. 1236

  4. 3216

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

Function argument evaluation order in C is unspecified (typically right-to-left). The call sum(a(),b(),c()) evaluates c() first (prints 3), then b() (prints 2), then a() (prints 1). sum() adds 1+2+3=6, which printf prints. Output: 3216. The return values are used in the sum, not the print order.