Home » C# Programming » Control Instructions

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;

Correct Answer: int a = 1, b = 2, c = 0; c = a < b ? a : 0;

← Previous Question Next Question→

More Questions from Control Instructions

Discussion & Comments

No comments yet. Be the first to comment!
Join Discussion