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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Systems Analysis Design Questions!