Q.– Given the code fragment:
int x = 100;
int a = x++;
int b = ++x;
int c = x++;
int d = (a < b) ? (a < c) ? a : (b<c) ? b : c : x;
System.out.print (d);
What is the result?
A) 101
B) Compilation fails.
C) 100
D) 103
E) 102
⧪ please give your answer in a comment section.
int x = 100;
int a = x++;
int b = ++x;
int c = x++;
int d = (a < b) ? (a < c) ? a : (b<c) ? b : c : x;
System.out.print (d);
What is the result?
A) 101
B) Compilation fails.
C) 100
D) 103
E) 102
⧪ please give your answer in a comment section.
3 Comments
C
ReplyDeletec
ReplyDeleteE
ReplyDelete