MCQOPTIONS
Saved Bookmarks
| 1. |
Follow the code snippet and chose the correct statement(s) intx; void f2() { intx=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 globalx |
| C. | In line3,x=2 isassigned to the globalx and line2 throws compilation error |
| D. | Both A and B |
| Answer» C. In line3,x=2 isassigned to the globalx and line2 throws compilation error | |