Name:     ID: 
 
Email: 

C# Quiz 2

True/False
Indicate whether the statement is true or false.
 

 1. 

In a switch statement, the keyword return usually terminates each case.
 

 2. 

You can combine as many AND and OR operators in an expression as needed.
 

 3. 

When if-else statements are nested, each else is always paired with the most recent unpaired if.
 

 4. 

You cannot relocate a control on a Form once you have added it.
 

 5. 

You are not required to create a Click() method for a Button.
 

 6. 

Flowchart creators use diamond shapes to indicate alternative courses of action.
 

 7. 

It is illegal to use a block to contain a single statement.
 

 8. 

Professional programmers usually do not retain the default names for Forms and controls.
 

 9. 

If you change a Form's Name, you will notice differences in the visual design.
 

 10. 

So much code is needed to create even the simplest of GUI programs that it is far more practical to develop the user interface visually in an IDE.
 

Multiple Choice
Identify the choice that best completes the statement or answers the question.
 

 11. 

When creating a flowchart or pseudocode representation of a task, what type of structure is one in which one step follows another unconditionally?
a.
single-decision
c.
branched
b.
dual-decision
d.
sequence
 

 12. 

After a user types a value into a TextBox in an executing program, where is the value stored?
a.
In the Text property of the TextBox.
c.
In the Label property of the TextBox.
b.
In the String property of the TextBox.
d.
In the Name property of the TextBox
 

 13. 

What sort of evaluation involves the evaluation of expressions in each part of a compound, conditional Boolean expression only as much as necessary to determine whether the expression is false?
a.
sequential
c.
smart
b.
sequence
d.
short-circuit
 

 14. 

What kind of GUI object is rectangular and provides an interface for collecting, displaying, and delivering information?
a.
Labels
c.
Buttons
b.
TextBoxes
d.
Forms
 

 15. 

What property can be modified to change the tab order for a GUI component?
a.
TabPos
c.
TabIndex
b.
TabNum
d.
TabPlace
 

 16. 

What conditional operator can be used to create a compound Boolean expression as an alternative to if statements?
a.
OR
c.
XOR
b.
AND
d.
NOT
 

 17. 

What character(s) function as the conditional OR operator in the C# programming language?
a.
&
c.
&&
b.
|
d.
||
 

 18. 

In a situation where you want to perform one action when a Boolean expression evaluates as true and an alternate action when it evaluates as false, otherwise known as a dual-alternative decision, what sort of statement should you use?
a.
if-else
c.
switch
b.
if
d.
fork
 

 19. 

When designing an application, what type of interface generally requires more time to develop?
a.
User
c.
Console
b.
GUI
d.
TUI
 

 20. 

The if expression that precedes a block in a decision structure is known as what type of statement?
a.
sequence
c.
K & R
b.
conditional
d.
control
 

 21. 

What character(s) function as the non-conditional Boolean logical AND operator in the C# programming language?
a.
&&
c.
&
b.
|
d.
||
 

 22. 

What serves as a control that is used to display text such as a prompt or a result of some computation?
a.
Form
c.
Label
b.
Button
d.
TextBox
 

 23. 

What type of structure involves choosing between alternative courses of action based on some value within a program?
a.
decision
c.
literal
b.
sequence
d.
fixed
 

 24. 

What should you use if you wish to execute two or more statements conditionally?
a.
A switch statement.
c.
A defined sequence structure.
b.
A block enclosed within a pair of curly braces.
d.
A declared decision structure.
 

 25. 

After you have added a Button onto a form, what can you do in order to create a method that executes when the user clicks the Button?
a.
You can select the Button, then create the method
c.
You can single click the Button, and then create the method.
b.
You can double-click the Button, and then create the method.
d.
You must delete the Button, and create the method first, then call the Button object by name.
 



 
         Start Over