1.

Which of the following is another way to rewrite the code snippet given below?int a = 1, b = 2, c = 0; if (a < b) c = a;

A. int a = 1, b = 2, c = 0; c = a < b ? a : 0;
B. int a = 1, b = 2, c = 0; a < b ? c = a : c = 0;
C. int a = 1, b = 2, c = 0; a < b ? c = a : c = 0 ? 0 : 0;
D. int a = 1, b = 2, c = 0; a < b ? return (c): return (0);
E. int a = 1, b = 2,c = 0; c = a < b : a ? 0;
Answer» B. int a = 1, b = 2, c = 0; a < b ? c = a : c = 0;


Discussion

No Comment Found