Question: 6. What is displayed when the following code executes? score = 0; if (score > 95) Console.Write(Congratulations! ); Console.Write(Thats a high score! ); Console.Write(This is

6. What is displayed when the following code executes?

score = 0; if (score > 95)

Console.Write(Congratulations! );

Console.Write(Thats a high score! );

Console.Write(This is a test question!);

a. This is a test question!

b. Congratulations! Thats a high score! This is a test question!

c. Thats a high score! This is a test question!

d. Congratulations! Thats a high score!

e. None of the above

7. 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

8. If you intend to place a block of statements within an if statement, you must use around the block:

a. Parentheses

b. Square brackets

c. Quotation marks

d. Curly braces

e. None of the above

9. What is the result of the following conditional expression when aValue = 100 and bValue = 7?

a. 0

b. 1000

c. 2000

d. 7

e. None of the above

10. When used with a while statement, which jump statement causes execution to halt inside a loop body and immediately transfers control to the conditional expression?

a. break

b. goto

c. return

d. continue

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 Databases Questions!