Question: What will be displayed from executing the following segment of code? You may assume testScore has a value of 90. int testScore; if (testScore <
What will be displayed from executing the following segment of code? You may assume testScore has a value of 90.
int testScore;
if (testScore < 60); // Note the semicolon.
Console.WriteLine("You failed the test!");
if (testScore > 60)
Console.WriteLine("You passed the test!");
else Console.WriteLine("You need to study for "
+ "the next test!");
a. You failed the test!
b. You passed the test!
c. You failed the test!
You passed the test!
d. You failed the test!
You need to study for the next test!
e. none of the above
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
