1.

Follow the code snippet and chose the correct statement(s) Int x; void f2() { Int x=1; // line1 ::x=2; // line2 x=2; //line3 }

A. The statement in line1 throws a compilation error
B. In line2,x=2 is assigned to the global x
C. In line3,x=2 is assigned to the global x and line2 throws compilation error
D. Both A and B
Answer» C. In line3,x=2 is assigned to the global x and line2 throws compilation error


Discussion

No Comment Found