Multiple choice technology programming languages

f1(int c) { printf("%d", c); } void main() { int a=1; f1(a++); }

  1. 0

  2. 1

  3. 2

  4. 3

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

The post-increment operator (a++) passes the current value of 'a' to the function, then increments it afterward. Since 'a' is initialized to 1, the value 1 is passed to f1() and printed. The increment happens after the function call completes.