Which statement in C# allows you to do the following: properly check the variable
code to determine whether it contains the character C, and if it does, display
‘‘This is a check’’ and then advance to a new line?
a. if code is equal to C
Console.WriteLine("This is a check");
b. if (code = "C")
Console.WriteLine("This is a check");
c. if (code == 'C')
Console.WriteLine("This is a check");
d. if (code == C)
Console.WriteLine("This is a check");
e. none of the above
Sorry the answer is not available at the moment…
If you are able to find the answer, please make sure to post it here. So that your Juniors have smile on their lips and feel happy.
Spread the 'tradition of sharing'.