Which of the following statements is correct about the C#.NET code snippet given below?
int d;
d = Convert.ToInt32( !(30 < 20) );
Answer: B
Sample Program:
bool falseFlag = false;
bool trueFlag = true;
Console.WriteLine("{0} converts to {1}.", falseFlag,
Convert.ToInt32(falseFlag));
Console.WriteLine("{0} converts to {1}.", trueFlag,
Convert.ToInt32(trueFlag));
The example displays the following output:
False converts to 0.
True converts to 1.
Discuss About this Question.