Name:     ID: 
 
Email: 

C# final b

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

 1. 

What operator is used for the purpose of creating objects in C#?
a.
save
c.
initialize
b.
new
d.
reserve
 

 2. 

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

 3. 

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.
dual-decision
b.
sequence
d.
branched
 

 4. 

What type of loop checks a Boolean expression at the "top" of the loop before the body has a chance to execute?
a.
do
c.
while
b.
repeat
d.
switch
 

 5. 

An array subscript can be an expression, but only as long as the expression evaluates to what type?
a.
double
c.
int
b.
float
d.
boolean
 

 6. 

A(n) ____ version of software has not been fully tested and may still contain bugs or errors.
a.
beta
c.
maintenance
b.
bug
d.
alpha
 

 7. 

The compiler checks for ____.
a.
debugger options
c.
semantic violations
b.
syntax rule violations
d.
files that are too large
 

 8. 

What C# method should you use in order to arrange an array in ascending order?
a.
Reverse()
c.
Order()
b.
Sort()
d.
BinarySearch()
 

 9. 

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

 10. 

Another way to write the following expression is ____.
                                             ans *= v1 - 1;
a.
ans = v1 * ans - 1;
c.
ans = v1 * (ans - 1);
b.
ans = ans * v1--;
d.
ans = ans * --v1;
 

 11. 

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.
short-circuit
c.
sequential
b.
smart
d.
sequence
 

 12. 

What can you use to assign a list of nondefault values to array elements at declaration?
a.
initializer list
c.
array initializer
b.
array specification
d.
value specification
 

 13. 

Packaging data characteristics and behaviors into a class is called ____.
a.
inheritance
c.
instantiation
b.
classes
d.
encapsulation
 

 14. 

The value 3.42e-4 is equivalent to _____.
a.
-3.420000
c.
-.000342
b.
.000342
d.
3420000
 

 15. 

What technique can be used to combine two different loops into one?
a.
short-circuiting loop
c.
pretesting loop
b.
loop accumulation
d.
loop fusion
 

 16. 

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 must delete the Button, and create the method first, then call the Button object by name.
d.
You can double-click the Button, and then create the method.
 

 17. 

Which of the following would display "Good day!" on the screen?
a.
Console.WriteLine("Good day!");
c.
Console.WriteLine["Good day!"];
b.
WriteLine.Console{"Good day!"};
d.
WriteLine.Console("Good day!");
 

 18. 

When using nested loops, what loop is contained entirely within an outer loop?
a.
inner loop
c.
pretest loop
b.
for loop
d.
posttest loop
 

 19. 

What is a garbage value in the C# programming language?
a.
It is an unknown, unassigned value.
c.
It is a variable that holds output text after it is displayed.
b.
It is a variable that is used as a placeholder.
d.
It is a variable that is assigned a value that has no purpose.
 

 20. 

A loop that is controlled by user input rather than altered by arithmetic is known as what type of loop?
a.
sentinel
c.
infinite
b.
indefinite
d.
definite
 

 21. 

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

 22. 

The special character that can be used with an identifier is ____.
a.
*
c.
_
b.
-
d.
#
 

 23. 

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

 24. 

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

 25. 

In Visual Studio .NET, the feature that attempts to sense what you are going to type before you type it is called ____.
a.
ToolTip
c.
tools
b.
Help
d.
IntelliSense
 

 26. 

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

 27. 

The first step found in most software development methodologies is ____.
a.
design
c.
desk check
b.
code
d.
analysis
 

 28. 

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

 29. 

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

 30. 

Which statement subtracts 100 from the original value of an answer?
a.
answer =- 100;
c.
answer = 100 -;
b.
100 -= answer;
d.
answer -= 100;
 

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

 31. 

In C#, arrays are objects.
 

 32. 

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

 33. 

In C#, an array's elements are numbered beginning with 1.
 

 34. 

When loop structures are nested, the inner loop must be entirely contained within the outer loop; loops can never overlap.
 

 35. 

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

 36. 

Prototypes range from being elaborate designs created with graphics, word processing, or paint programs, to being quite cryptic sketches created with paper and pencil.
 

 37. 

Constants are normally named using all lowercase characters, separating second and subsequent words with the underscore character.
 

 38. 

1. The rule that every statement should end with a semicolon is an example of a syntax rule.
 

 39. 

You cannot use a while loop for indefinite loops.
 

 40. 

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

 41. 

Both static and constant are keywords in C#.
 

 42. 

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

 43. 

A Boolean expression is evaluated within every while loop to determine whether the loop body will execute.
 

 44. 

Classes and class diagrams are used most often with the structured procedural approach to software development.
 

 45. 

Statements in a for loop body cannot be blocked.
 

 46. 

When you instantiate an array, you can choose its location in memory.
 

 47. 

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

 48. 

IDE stands for Integrated Development Environment.
 

 49. 

In C#, it is tradition to name the file containing the class the same name as the class name, except the file name will have a .c# extension affixed to the end of the name.
 

 50. 

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.
 



 
         Start Over