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
Step: 1
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started