Visual Basic Chapter 1-7 Dietel Final
Which operator performs string concatenation? & @ % #
&
Which of the following loop-continuation conditions would cause a While End While statement to stop executing? 3 <= 11 7 > 14 6 <> 9 All of these.
7 > 14
Part of the .NET Initiative is Microsoft's ________ technology, which enables you to create web applications. class library VM CLR ASP.NET
ASP.NET
The Do Loop While repetition statement tests the condition ________ the body of the loop executes. before while after None of these.
After
The Microsoft Developers Network (MSDN) online library provides: tutorials. articles. downloads. All of these.
All of these
Set a Label's ________ property to Fixed3D to give the Label a three-dimensional appearance. BorderStyle BorderDepth BorderShading BorderPerspective
BorderStyle
A ________ event occurs when a RadioButton is either selected or deselected. SelectChanged CheckedChanged SelectDeselect None of these.
CheckedChanged
For monetary calculations use the data type: Single. Double. Decimal. Integer.
Decimal
Infinite loops occur when the loop-continuation condition in a ________ statement never becomes true. While End While Do Loop While Do Loop Until Do While Loop
Do loop Until
Which of the following method calls would not be valid with the following method header? Sub Example(ByVal a As Boolean, Optional ByVal value2 As Integer = 0) Example() Example(True) Example(False, 10) None of these.
Example()
A While statement automatically increments a variable that a programmer specifies. True False
False
An assignment statement assigns a variable to a value. True False
False
An assignment statement is evaluated left-side first. True False
False
By clicking on the pluses (+) and minuses (-) in the node tree you can add or remove items. True False
False
Changes made to an entire array that has been passed to a method will not affect the original values of the array. True False
False
Control statements cannot be placed inside other control statements. True False
False
Counter-controlled repetition requires only a control variable, an initial value for the control variable and an increment or decrement. True False
False
High-level computer language programs are directly understood by a computer. True False
False
In a Do Loop Until statement, the loop body is not always executed. True False
False
RadioButtons can be separated into several groups, but all of the groups must be in the same container (typically a GroupBox). True False
False
Secondary storage stores data only while the computer is turned on. True False
False
The != operator compares two numbers to determine if they are not equal. True False
False
The fractional part in integer division is stored in a variable declared automatically at run-time. True False
False
The order of actions in an algorithm is irrelevant. True False
False
To make a new project you must go into the Get Started section. True False
False
Unlike C#, Visual Basic is object oriented and contains a powerful class library. True False
False
Visual Basic is Case sensitive; therefore, an identifier named Pencil is not the same as one named pencil. True False
False
When a program is executed, array element indices are checked for validity all indices must be greater than or equal to 0 and less than or equal to the length of the array. True False
False
While in run mode, programmers have access to all the environment windows. True False
False
A Case Else must be provided for every Switch statement. True False
Flase
For security reasons, you cannot browse the web from within the Visual Studio environment. True False
Flase
Repeating high-quality, high-performance code in a program helps ensure higher quality programs. True False
Flase
Visual Basic files use a .net filename extension. True False
Flase
Which of the following headers will cause the body not to execute at least once? For i As Integer = 1 To 10 For i As Integer = 1 To 10 Step 2 For i As Integer = 10 To 20 Step -1 None of these.
For i As Integer = 10 To 20 Step -1
Which of the following is a double-selection control statement? Do While Loop For Next If Then Else If Then
If Then Else
The three types of selection statements are: If Then, For Next and Select Case. If Then, Do While Loop and Select Case. If Then, If Then Else and While. If Then, If Then Else and Select Case.
If Then, If Then Else and Select Case.
Objects normally are not allowed to know how other objects are implemented. This is called: encarceration. information hiding. blindfolding. inheritance.
Information Hiding
A Form's ________ event occurs just before the Form is displayed on the screen, typically as a result of executing the program. Display Raised Execute Load
Load
Which of the following represents modulus arithmetic? Mod / % ^
Mod
Which method call does the method head Sub ModifyArray(ByVal a As Double()) represent? Assume that the array being passed (list) is already defined. ModifyArray( double() list ) ModifyArray( double() : list ) ModifyArray( double list() ) ModifyArray( list )
ModifyArray( list )
Which of the following statements is false? Case statements use the keyword Is to determine whether the controlling expression satisfies a condition. Multiple values can be tested in a Case statement where the values are separated by commas. Multiple values in a range can be tested using the To keyword. None of these.
None of these.
The PictureBox control is used to display: text and images. only images. only text. colors.
Only Images
Which of the following is true? Pseudocode is used to specify the variables needed by the program. Pseudocode compiles into machine code. Pseudocode is used to describe executable statements that will eventually be translated by the programmer into a program. Pseudocode is executed on a computer.
Pseudocode is used to describe executable statements that will eventually be translated by the programmer into a program.
Which of the following is not true about GUIs? GUIs allow users to interact visually with programs. A GUI gives a program a distinctive look and feel. Scrollbars are always present in GUIs. GUIs are built from GUI controls called widgets.
Scrollbars are always present in GUIs.
When you drag a control across a Form, ________ appear to help you position the control with respect to the Form's edges and other controls. edge lines guide lines position lines snap lines
Snap lines
A CheckBox is known as a(n) ________ button because it can be "on" or "off." switch alternating state on/off
State
If a local variable in a method has the same name as a variable in the main program, what will occur. An error is generated. The variable in the main program is "hidden" until the method is finished executing. The variable in the main program will override the variable from the method. None of these.
The variable in the main program is "hidden" until the method is finished executing.
What is output in the GUI by the following Visual Basic code segment? This porridge is too cold! This porridge is just right! This porridge is too hot! This porridge is just right! This porridge is just right! None of these.
This porridge is too hot! This porridge is just right!
An assembler converts assembly language programs into machine language. True False
True
Autohide is what enables the tool box to shrink down to the edge of the screen. True False
True
Chapter 5 Quiz Question 1 0 / 1 point The Xor operator is true if and only if one of its operands results in a true value and the other a false value. True False
True
If Then Else selection statement allows you to specify that a different action (or sequence of actions) be performed when the condition is true than when the condition is false. True False
True
If values generated by a random number generator are truly random, the frequencies of each of the values will be approximately the same. True False
True
In a Do Loop While statement, the loop body is always executed at least once. True False
True
In a Do Loop While statement, the loop body is always executed at least once. True False
True
Many classes and methods for performing common operations such as mathematical calculations and string manipulations are already provided by .NET's Framework Class Library. True False
True
Pseudocode helps you conceptualize a program during the design process. True False
True
The Visual Basic operator ^ can be used for exponentiation. True False
True
The logical operator Not is also called logical negation. True False
True
The value used to indicate a specific location within an array is called the index or subscript. True False
True
Variables that store totals should typically be initialized to zero before being used in a program. True False
True
Visual Basic is an event-driven, fully object-oriented visual programming language. True False
True
Visual Basic's currency formatting code, C, separates a number every three digits with commas and sets the number of decimal places to two. True False
True
You insert comments in your programs to document and improve the readability of your code. True False
True
To show the Solution Explorer if it is not shown, select: View > Solution Explorer. File > Solution Explorer. Edit > Solution Explorer. Tools > Solution Explorer.
View > Solution Explorer.
Microsoft's ________ is a cloud computing platform that allows you to develop, manage and distribute your apps in the cloud Common Language Runtime Windows Azure virtual machine Windows 8
Windows Azure
Which of the following statements is false? Windows Phone 8 is a pared down version of Windows 8 designed for smartphones. Windows Phone 8 has the same core operating systems services as Windows 8, including a common file system, security, networking, media and Internet Explorer 10 (IE10) web browser technology. Windows Phone 8 has all of the features of Windows 8 plus the features necessary for smartphones. None of these.
Windows Phone 8 has all of the features of Windows 8 plus the features necessary for smartphones.
By default, the IDE assigns this name to a new Windows project: NewProject1 WindowsApplication1. NewProject. MyProject.
WindowsApplication1
The ________ is a collection of hardware and software associated with the Internet that allows computer users to locate and view multimedia-based documents on almost any subject. HyperText Markup Language HyperText Transfer Protocol World Wide Web CERN
Wolrd Wide Web
Passing an argument to a method by value provides the method with: the address of the value in memory. a separate copy of the value. the type of the value. None of these.
a separate copy of the value.
What is an algorithm? a specification of a series of actions and the order in which those actions should be performed to solve a particular problem an English description of a problem to be solved the process of converting between data types None of these.
a specification of a series of actions and the order in which those actions should be performed to solve a particular problem
Microsoft's .NET Framework: executes applications. contains a class library. provides many capabilities for building Visual Basic applications. All of these.
all of these
The purpose of the Visual Basic Express Edition IDE is to: create programs. run programs. debug programs. All of these.
all of these
The Properties window: allows you to modify control's properties without writing any code. displays a control's information. has the same set of options for every control. allows you to modify control's properties without writing any code and displays a control's information allows you to modify control's properties without writing any code and has the same set of options for every control
allows you to modify control's properties without writing any code and displays a control's information
Machine languages: are machine dependent. are universal between all machines consist of numbers and letters. need to be translated in order for the machine to understand commands.
are machine dependent.
Computers process data, using sets of instructions called: softgoods. computer programs recipes hardware.
computer programs
The View menu: contains commands for displaying IDE windows and toolbars. contains commands for arranging a form's controls. contains commands for managing a project and its files. contains commands for compiling a program.
contains commands for displaying IDE windows and toolbars.
When you know how many times a loop will execute in advance, a(n) ________ loop should be used. sentinel infinite counter-controlled None of these.
counter-controlled
What is typically the most difficult part of solving a problem on a computer? deciding what problem needs to be solved developing the algorithm for the solution producing a program from the algorithm None of these.
developing the algorithm for the solution
Which of the following is in highest-to-lowest order of operator precedence? multiplication, division, exponentiation addition, subtraction, division exponentiation, multiplication, addition None of these.
exponentiation, multiplication, addition
The W3C is an organization that: maintains and runs the Internet. removes junk and broken links from the web. developed e-mail. helps to develop web technologies.
helps to develop web technologies
The order of simplicity to a human of the three basic types of languages is (easiest to hardest): high-level, assembly, machine. assembly, machine, high-level. machine, high-level, assembly. machine, assembly, high-level.
high-level, assembly, machine.
The ________ statement allows a program to make a decision based on the truth or falsity of some condition. If Then Test Whether None of these.
if then
On the Start Page, the Get Started section contains: sample projects. feedback links. recent projects. links to connect to the developer community.
links to connect to the developer community.
Which of the following is not a debugger feature? examining and setting variable values watching the values of variables and expressions viewing the order in which methods are called locating syntax errors
locating syntax errors
A method is invoked by a: return statement. method header. method call. None of these.
method call
What was the most important capability of C++ that C did not provide? networking technology data type technology object-oriented technology adding dynamic content to web pages
object-oriented technology
The Do Loop While statement is an example of a: selection statement. repetition statement. loop statement. sequence statement.
repetition statement.
The Step Out debugger command can be used to: return from the method to the caller. modify the code at execution time to correct a logic error. execute the code statements in a different order to locate a bug. view the code for a called method as it executes.
return from the method to the caller.
If Then is a(n) ________ statement. restricted selection repetition unrestricted
selection
The optional ________ keyword specifies the increment of the For Next loop. Increase Increment Step Raise
step
All arrays have access to the methods and properties of this class: VisualBasic.Array. Microsoft.Array. System.Array. None of these.
system.array
All variables must be declared with a name and a data type before they can be used in a program. True False
true
Array method GetUpperBound returns the index of the last element in an array. The value returned by method GetUpperBound is one less than the value of the array's Length property. True False
true
Overloaded methods normally perform similar tasks, but on different types of data. True False
true
The If Then selection statement performs an action if a condition is true or skips the action if the condition is false. True False
true
Variables declared in a method exist while the method is active and are destroyed when the method is exited. True False
true
Visual Studio provides an Online Community section that provides ways to contact other software developers via the Internet. True False
true