Home / Report Question

Q. c = (n) ? a : b; can be rewritten asexp1 ? exp2 : exp3;
  • A. if(n){c = b;}else{c = a;}
  • B. if(n){c = a;}else{c = b;}
  • C. if(!n){c = a;}else{c = b;}
  • D. None of the above

Correct Answer: B