exam jam
The increment operator is ________. -- ++ -= +=
++
The decrement operator is ________. += -- -= ++
--
If you specify a path in a string literal, be sure to prefix the string with the ________ character. # @ $ *
@
You can use a(n) ________ to test a condition, and then return either true or false to indicate whether the condition exists.. reference parameter Boolean method if-else statement void method
Boolean method
Which of the following is the best choice for modularizing input validation? Boolean methods nested if statements void methods none of these
Boolean methods
________ are commonly used to control the number of times that a loop iterates. Boolean variables Sentinel variables Counter variables Named constants
Counter variables
If the user clicks the Cancel button, the SaveFileDialog control's ShowDialog method returns the value ________. Result.False DialogResult.Cancel DialogResult.Abort Result.NULL
DialogResult.Cancle
If the user clicks the Open button, the OpenFileDialog control's ShowDialog method returns the value ________. Result.True DialogResult.OK DialogResult.Open Result.OpenFile
DialogResult.OK
You can use the StreamReader class's ________ to determine if the file's read position is at the end of the file. EndOfFile property StreamEnd method EndOfStream property EOF method
EndOfStream property
To append data to an existing file, you open it with the ________ method. File.Append File.AppendAll File.AppendText File.OpenExistingText
File.AppendText
When the user selects a file with the Open dialog box, the file's path and filename are stored in the control's ________. FilePath property Source property Location property Filename property
Filename property
You can specify the directory to be initially displayed by the Open dialog box by storing its path in the ________. InitialDirectory property Source property Filename property Path property
InitialDirectory property
To add an item to a ListBox control with code, you call the control's ________ method. Add.Items Items.Add Items.Append Items.Insert
Items.Add
ListBox controls have an ________ method that erases all the items in the Items property. Items.Erase Items.Remove Items.Clear Items.Reset
Items.clear
When you run an application, the application's form is loaded into memory and an event known as the ________ takes place. Load event Launch event Boot event Initialization event
Load event
Once you have created a Random object, you can call its ________ method to get a random integer number. Next GetInteger GenerateNumber NextInteger
Next
You can call a Random object's ________ method to get a random floating-point number between 0.0 and 1.0. GetDouble NextFloat NextDouble DoubleRand
NextDouble
The ________ is useful in applications that must open an existing file because it allows the user to browse the system and select the file. File.OpenText method OpenFileDialog control Open dialog box Windows Explorer
Open dialog box
The ________ displays a standard Windows Open dialog box. Open method OpenFileDialog control SaveFileDialog control component tray
OpenFileDialog control
It is a standard convention among C# programmers to use ________ for method names because it differentiates method names from variable and field names. camelCase lowercase characters Pascal case uppercase characters
Pascal case
The .NET Framework provides a class named ________ that you can use in C# to generate random numbers. Rand Random GenNum RandomGenerator
Random
You can use the StreamReader class's ________ to read a line of text from a file. ReadLine method ReadText method GetNext method Read method
ReadLine method
________ are useful for establishing two-way communication between methods. Reference parameters Named arguments Default arguments Parameter lists
Reference parameters
The ________ allows the user to browse the system and select a location and name for a file that is about to be saved. Save As dialog box Save File dialog box Select Source dialog box Open dialog box
Save As dialog box
The ________ displays a standard Windows Save As dialog box. SaveAs method SaveFileDialog control Save_File event OpenFileDialog control
SaveFileDialog control
In code, you can display a Save As dialog box by calling the SaveFileDialog control's ________ method. SaveAs Show ShowDialog Display
ShowDialog
Which one of the following statements correctly calls a method named ShowName? private void ShowName() ShowName(); Call.ShowName(); ShowName;
ShowName();
When you want to read data from a text file, you create a file object using the ________. StreamReader class TextReader class StreamWriter class TextWriter class
StreamReader class
When you want to write data to a text file, you create a file object using the ________. TextReader class TextWriter class StreamReader class StreamWriter class
StreamWriter class
You can change the default text displayed in the Open dialog box's title bar by changing the control's ________. Caption property Text property Title property Heading property
Title property
The ________ is a method provided by the StreamWriter class that writes an item of data to a text file without writing a newline character. Print method Text method WriteLine method Write method
Write method
You can use the StreamWriter class's ________ to write a line of text to a file. PrintLine method WriteText method WriteLine method PrintText method
WriteLine method
The variable that is used to accumulate the total of the numbers in a running total is called a(n) ________. counter sentinel entity accumulator
accumulator
Which of the following data types can be returned from a method? int bool string any of these
any of these
Pieces of data that are sent into a method are known as ________. references variables arguments parameters
arguments
When you pass an argument to a method, the argument's data type must be ________ with the receiving parameter's data type. assignment compatible user friendly data bound memory mapped
assignment compatible
A ________ contains data that has not been converted to text. source file binary file data file save file
binary file
The statement or block of statements following the while clause is known as the ________ of the loop. assembly body definition sequence structure
body
The benefit of using methods is known as ________ because you are writing code to perform a task once and then reusing it each time you need to perform the task. The benefit of using methods is known as ________ because you are writing code to perform a task once and then reusing it each time you need to perform the task. Selected Answer: Incorrect [None Given] Answers: nominal assignment minimal tasking logic recycling Correct code reuse nominal assignment minimal tasking logic recycling code reuse
code reuse
When controls such as the OpenFileDialog and SaveFileDialog are created they do not appear on the form, but in an area at the bottom of the Designer known as the ________. control overflow design space component tray virtual form
component tray
To ________ a variable means to decrease its value. subtract increment decrement supplement
decrement
When a ________ is provided for a parameter, it becomes possible to call the method without explicitly passing an argument into the parameter. named argument Boolean value default argument bitwise operator
default argument
When you work with a ________, you access data from the beginning of the file to the end of the file. sequential access file direct access file text file input file
direct access file
When you work with a ________, you can jump directly to any piece of data in the file without reading the data that comes before it. file object binary file direct access file sequential access file
direct access file
Dividing a large problem into several smaller problems that are easily solved is sometimes called ________. programmatic simplification divide and conquer top down design parallel design
divide and conquer
The ________ is a posttest loop, which means it performs an iteration before testing its Boolean expression. for loop while loop do-while loop do-before loop
do-while loop
A ________, is an object that is associated with a specific file and provides a way for the program to work with that file. file instance file object filename class referential extension
file object
Files on disk are identified by a(n) ________. index filename access number binary signature
filename
Many systems, including Windows, support the use of ________, which are short sequences of characters that appear at the end of a filename and are preceded by a period. filename extensions pragmatic identifiers binary indices run time signatures
filename extensions
Be careful not to place a statement that modifies the counter variable in the body of the ________. while loop if statement for loop switch statement
for loop
The ________ is specifically designed for situations requiring a counter variable to control the number of times that a loop iterates. while loop if-else statement for loop switch statement
for loop
To ________ a variable means to increase its value. append decrement add increment
increment
If a loop does not have a way of stopping, it is called a(n) ________. runaway loop game loop infinite loop expressionless loop
infinite loop
The first expression that appears in the loop header of the for loop is the ________, which is normally used to initialize a counter variable to its starting value. update expression test expression Boolean expression Initialization expression
initialization expression
The term ________ is used to describe a file from which data is read. input file output file data file record
input file
ListBox controls have an ________ property that reports the number of items stored in the ListBox. Items.Count Items.Size Items.List Items.Contains
items.count
Each time the loop executes its statement or statements, we say the loop is iterating, or performing a(n) ________. cycle pass execution iteration
iteration
A parameter variable's scope is the ________ in which the parameter variable is declared. namespace class field method
method
The ________ is a collection of statements that are performed when the method is executed. method body executable code method header method code listing
method body
The ________, which appears at the beginning of a method definition, lists several important things about the method, including the method's name. method description method body method specification method header
method header
In general terms, a program that is broken into smaller units of code, such as methods, is known as a ________. tiered project solution method-based solution modularized program divisional program
modularized program
A method that contains a(n) ________ allows you to specify which parameter variable the argument should be passed to. named argument dynamic parameter named constant alternative argument
named argument
The expression ________ causes an object of the Random class to be created in memory. GetRandom(int) GenerateRandom(number) new Random() random new()
new Random()
A ________ is an invisible character that specifies the end of a line of text. line feed character newline character carriage return character null character
newline character
In C#, you declare an output parameter by writing the ________ keyword before the parameter variable's data type. public ref const out
out
The term ________ is used to describe a file to which data is written. input file output file data file record
output file
A(n) ________ works like a reference parameter, but the argument does not have to be set to a value before it is passed into the parameter. parameter list named argument output parameter named constant
output parameter
A parameter variable, often simply called a(n) ________, is a special variable that receives an argument when a method is called. parameter argument reference variable
parameter
When a method contains multiple parameter declarations, the declarations are often referred to as a(n) ________. variable cache alternative collection parameter list overloaded reference
parameter list
When you want a method to be able to change the value of a variable that is passed to it as an argument, the variable must be ________. passed by value a literal value a parameter list passed by reference
passed by reference
When an argument is ________, only a copy of the argument's value is passed into the parameter variable. passed by reference passed by value named uninitialized
passed by value
When the ++ and -- operators are written after their operands it is called ________. prefix mode suffix mode appendix mode postfix mode
postfix mode
The ++ and -- operators can be written before their operands, which is called ________. preface mode postfix mode prefix mode superscript mode
prefix mode
Because the for loop tests its Boolean expression before it performs an iteration, it is a ________. pretest loop pseudo loop posttest loop infinite loop
pretest loop
The while loop is known as a ________, which means it tests its condition before performing an iteration. posttest loop pretest loop proactive loop preemptive loop
pretest loop
The numbers that are generated by the Random class are ________that are calculated by a formula. pseudorandom numbers binary encoded numbers algebraic derivatives complex variables
pseudorandom numbers
A file's ________ marks the location of the next item that will be read from the file. bit count index value read position newline character
read position
In C#, you declare a reference parameter by writing the ________ keyword before the parameter variable's data type. const ref out private
ref
A value-returning statement must have a(n) ________ statement. return assignment logical void
return
The memory address that is saved by the system when a method is called and is the location to which the system should return after a method ends is known as the ________. method address virtual break return point jump position
return point
When working with value-returning methods, the data type of the value that the method returns is commonly called the method's ________. method value named type assigned value return type
return type
A(n) ________ accumulates a total by adding each number in a series as they are read from a file. running total numeric tally active summary dynamic collection
running total
A ________ is used in the calculation to generate random numbers. sentinel logarithmic value seed value Random object
seed value
The second expression that appears in the loop header of the for loop is the ________, which is a Boolean expression that controls the execution of the loop. test expression update expression initialization expression control expression
test expression
A ________ contains data that has been encoded as text using a scheme such as Unicode. document spreadsheet binary file text file
text file
Programmers commonly use a technique known as ________ to break down an algorithm into methods. flowcharting top-down design modular prototyping subtask recognition
top-down design
In the loop header of the for loop, which expression should not end with a semicolon? initialization expression test expression update expression none of these
update expression
The third expression that appears in the loop header of the for loop is the ________, which executes at the end of each iteration, and it is typically the statement that increments the loop's counter variable. test expression update expression initialization expression increment expression
update expression
When a ________ finishes, it returns a value to the statement that called it. public method value-returning method void method private method
value-returning method
When you call a ________, it executes the statements that it contains and then it returns a value back to the statement that called it. recursive method void method value-returning method public method
value-returning method
When you call a ________, it simply executes the statements it contains and then terminates. void method terminal method value-returning method private method
void method
The ________ begins with the word while, followed by a Boolean expression that is enclosed in parentheses. conditional statement logic mark while clause loop parameter
while clause