ABS Introduction to programming with VB.net
Mastering VB.net: Programming Fundamentals Quiz
Welcome to the Mastering VB.net quiz! Dive into the world of Visual Basic programming with our comprehensive 58-question quiz designed to test your knowledge and understanding of the core concepts.
Whether you're a beginner or looking to solidify your programming skills, this quiz covers a range of topics, including:
- Loops and conditional statements
- Fun
ction procedures and arguments - Variables and data types
- Control structures and nested blocks
The value of the control variable should not be altered within the body of a For?Next loop.
True
False
The body of a For…Next loop in Visual Basic will always be executed once no matter what the initial and terminating values are.
True
False
The body of a For…Next loop in Visual Basic will always be executed once no matter what the initial and terminating values are. Duplicate question?
True
False
The arguments appearing in a Call statement must match the parameters in the appropriate Sub or Function header in all but one of the following ways. Which one?
Number of arguments
Names of arguments
Data type of arguments
Order of arguments
The ______________ of a Sub procedure are vehicles for passing numbers and strings to the Sub procedure.
Call Statements
Arguments
Parameters
Variables declared inside
Which of the following is NOT a reason for using procedures?
They break a complex problem down into smaller pieces.
They make a program run faster.
They can be reused easily.
They make it possible for a team of people to work together on a single program.
Which one of the following is true about arguments and parameters?
Arguments appear in Call statements; parameters appear in Sub statements.
Parameters appear in Call statements; arguments appear in Sub statements.
They are synonymous terms.
They are completely unrelated in a program.
Each individual variable in the list student(0), student(1), student(2) is known as a(n)
Subscript
Dimension
Element
Type
Function names should be suggestive of the role performed. The names also must conform to the rules for naming variables.
True
False
Suppose you want to write a procedure that takes three numbers, num1, num2, and num3; and returns their sum, product, and average. It is best to use a Function procedure for this task.
True
False
Although a function can return a value, it cannot directly display information in a text box.
True
False
The input to a user-defined function can consist of:
A single value
One or more values
No values
All of the above
Variables appearing in the header of a Function procedure are called ____________.
Values of the function
Parameters
Coordinates
Arguments
Constructs in which an If block is contained inside another If block are called:
Multi-If blocks
Nested If blocks
Sequential If blocks
None of the above
A variable declared inside a Select Case block cannot be referred to by code outside of the block.
True
False
Suppose that the selector in a Select Case block is the string variable myVar. Which of the following is NOT a valid Case clause?
Case “Adams”
Case “739”
Case (myVar.Substring(0, 1)
Case myVar.Length
Different items appearing in the same value list of a Select Case block must be separated by a ____________.
Semi colon
Comma
Colon
Pair of quotation marks
Which Case clause will be true whenever the value of the selector in a Select Case block is between 1 and 5 or is 8?
Case 1 To 8
Case 1 To 5, 8
Case 1 To 8, 5
Case 1 To 5; 8
Which Case clause will be true whenever the value of the selector in a Select Case block is greater than or equal to 7?
Case Is >7
Case Is
Case Is >
Case Is <
What type of items are valid for use in the value list of a Case clause?
Literals
Variables
Expressions
All of the above
What happens to a variable declared locally inside a Sub procedure after the procedure terminates?
It maintains its value even after the End Sub statement executes.
It ceases to exist after the End Sub statement executes.
It loses its value temporarily after the End Sub statement executes, but regains that value upon re-entry to the Sub procedure.
It is reset to its default value.
Suppose a variable is passed by reference to a parameter of a Sub procedure, and the parameter has its value changed inside the Sub procedure. What will the value of the variable be after the Sub procedure has executed?
It will have the newly modified value from inside the Sub procedure.
Its value can?t be determined without more information.
It will retain the value it had before the call to the Sub procedure
None of the above.
Suppose a variable is passed by value to a parameter of a Sub procedure, and the parameter has its value changed inside the Sub procedure. What will the value of the variable be after the Sub procedure has executed?
It will have the newly modified value from inside the Sub procedure
Its value can?t be determined without more information
It will retain the value it had before the call to the Sub procedure
None of the above.
The declaration statement for a class-level variable should be placed __________.
Inside an event procedure
Inside a general procedure
Anywhere in the program region, except inside a procedure
Above the statement Public Class frmName
Variables declared inside a procedure are said to have ________________.
Local scope
Procedure-level scope
Class-level scope
None of the above
Suppose the variable myName is declared in a Dim statement in two different Sub procedures. Which statement is true?
The program will malfunction when it is executed.
When the value of myName is changed in one Sub procedure, it will also be changed in the other Sub procedure.
Visual Basic’s smart editor will alert you that this is an error before the program is executed.
The two variables will be local to their respective Sub procedures.
Which of the following statements is guaranteed to pass the variable numVar by value to the Sub procedure Tally?
Tally(numVar)
Tally(ByVal numVar)
Tally((numVar))
Tally(ByVal numVar As Double)
The ______________ of a Sub procedure are vehicles for passing numbers and strings to the Sub procedure.
Call Statements
Arguments
Parameters
Variables declared inside
Which of the following is NOT a reason for using procedures?
They break a complex problem down into smaller pieces.
They make a program run faster.
They can be reused easily.
They make it possible for a team of people to work together on a single program.
Which one of the following is true about arguments and parameters?
Arguments appear in Call statements; parameters appear in Sub statements.
Parameters appear in Call statements; arguments appear in Sub statements.
They are synonymous terms.
They are completely unrelated in a program.
Each individual variable in the list student(0), student(1), student(2) is known as a(n)
Subscript
Dimension
Element
Type
Function names should be suggestive of the role performe+The names also must conform to the rules for naming variables.
True
False
Suppose you want to write a procedure that takes three numbers, num1, num2, and num3; and returns their sum, product, and average. It is best to use a Function procedure for this task.
True
False
Although a function can return a value, it cannot directly display information in a text box.
True
False
The input to a user-defined function can consist of:
A single value
One or more values
No values
All of the above
{"name":"ABS Introduction to programming with VB.net", "url":"https://www.quiz-maker.com/QPREVIEW","txt":"Welcome to the Mastering VB.net quiz! Dive into the world of Visual Basic programming with our comprehensive 58-question quiz designed to test your knowledge and understanding of the core concepts.Whether you're a beginner or looking to solidify your programming skills, this quiz covers a range of topics, including:Loops and conditional statementsFunction procedures and argumentsVariables and data typesControl structures and nested blocks","img":"https:/images/course1.png"}