What gets printed when the following program is compiled and run?
Nick987:
what program?
Answers
Answered by
0
(String args[]){
int i, j=1;
i = (j>1)?2:1;
switch(i){
case 0: System.out.println(0); break;
case 1: System.out.println(1);
case 2: System.out.println(2); break;
case 3: System.out.println(3); break;
}
}
}
A. 0
B. 1
C. 2
D. 3
E. 1 2
Answer: Option E
HOPE IT IS HELPFUL
int i, j=1;
i = (j>1)?2:1;
switch(i){
case 0: System.out.println(0); break;
case 1: System.out.println(1);
case 2: System.out.println(2); break;
case 3: System.out.println(3); break;
}
}
}
A. 0
B. 1
C. 2
D. 3
E. 1 2
Answer: Option E
HOPE IT IS HELPFUL
Similar questions
Math,
6 months ago
Physics,
6 months ago
Science,
1 year ago
Science,
1 year ago
Social Sciences,
1 year ago