Multiple choice general knowledge science & technology

struct io { int i=0; int j; }; void main() { io op; op.j=20; printf("i = %d",op.i); printf("j= %d",op.j); }

  1. output i=0 j=20

  2. output j=20

  3. compiler error starting from "printf("i = %d",op.i);"

  4. compiler error starting at the end of struct io

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

C structs cannot have member initialization at declaration (int i=0 is invalid). This causes a compiler error at struct definition time, not at the printf statements.