Question: Question 1 Research has shown that all programs can be written in terms of only three control structures. They are sequence, __________ and repetition structures.
Question 1
Research has shown that all programs can be written in terms of only three control structures. They are sequence, __________ and repetition structures.
serialization
selection
sorting
searching
Question 2
Normally, statements in a program are executed one after the other in the order in which they are written. This is called __________ execution.
inline
seeking
ordered
sequential
Question 3
The C# compiler ignores __________ characters like blanks, tabs and newlines used for indentation and vertical spacing.
invisible
whitespace
clear
transparent
Question 4
The relational operator used for checking whether two operands are equal to each other is represented with an equals sign, =.
True
False
Question 5
The __________ selection statement executes a block of code if a condition is true and does nothing if the condition is false.
if
when
if...else
switch
Question 6
The _____ statement executes one of out of multiple cases based on the specific value of a single variable.
if
if...else
switch
match
Question 7
In an if statement with only a single statement in the body, the enclosing curly braces, { ... }, can be omitted.
True
False
Question 8
Which of the following relational operators can be used to test if two values are not the same?
==
!=
=!
!
Question 9
Given the code snippet below, what value would be stored in the variable taxRate after the if statement has executed?
int income = 95000;
double taxRate;
if(income < 9950)
taxRate = .1;
else if (income < 40525)
taxRate = .12;
else if (income < 86375)
taxRate = .22;
else if (income < 164925)
taxRate = .24;
else if (income < 209425)
taxRate = .32;
else if (income < 523600)
taxRate = .35;
else
taxRate = .37;
.35
.22
.24
.37
Question 10
In a switch statement, we can include a _____ case which will execute when no other case contains a match for the value.
else
otherwise
case?
default
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
