MCQOPTIONS
Saved Bookmarks
| 1. |
Follow the code snippet and chose the correct statement(s) int x; void f2() { int x = 1 ; // line 1 :: x = 2; // line 2 x = 2; // line 3 } |
| A. | The statement in line 1 throws a compilation error |
| B. | In line 2 , x=2 is assigned to the global x |
| C. | In line 3, x=2 is assigned to the global x and line 2 throws compilation error |
| D. | Both A and B |
| Answer» C. In line 3, x=2 is assigned to the global x and line 2 throws compilation error | |