First Quarterly Practice Test (Vb)

Reviewed by Editorial Team
The ProProfs editorial team is comprised of experienced subject matter experts. They've collectively created over 10,000 quizzes and lessons, serving over 100 million users. Our team includes in-house content moderators and subject matter experts, as well as a global network of rigorously trained contributors. All adhere to our comprehensive editorial guidelines, ensuring the delivery of high-quality content.
Learn about Our Editorial Process
| By KretschK
K
KretschK
Community Contributor
Quizzes Created: 9 | Total Attempts: 7,328
| Attempts: 84 | Questions: 14
Please wait...
Question 1 / 14
0 %
0/100
Score 0/100
1. What is the result of the following expression?        60 Mod 7

Explanation

Mod means remainder. 60 divided by 7 is 8 remainder 4

Submit
Please wait...
About This Quiz
First Quarterly Practice Test (Vb) - Quiz

This First Quarterly Practice Test in Visual Basic assesses understanding of conditional logic and comparisons in VB programming. It challenges learners with questions on If structures, string comparison,... see moreand logical expressions, enhancing their problem-solving skills in software development. see less

2. Which of the following is not a legal variable name?

Explanation

The variable name "#tag" is not a legal variable name because it starts with a special character (#), which is not allowed in variable names. Variable names in most programming languages should start with a letter or an underscore.

Submit
3. What is the result of the following expression?Dim m as Integer = 3Dim p as Integer = 10(p - 5 + 4) + (p \ 3 * 2)  * m

Explanation

(10 - 5 + 4) + (10 \ 3 * 2) * 3
(5 + 4) + (3 * 2) * 3
9 + 6 * 3
9 + 18
27

Submit
4. It is generally a good idea to use many  fonts on a form

Explanation

Using many fonts on a form is generally not a good idea because it can make the form appear cluttered and unprofessional. Having a consistent and limited number of fonts helps maintain readability and visual coherence. It is recommended to stick to a maximum of two or three complementary fonts to ensure a clean and organized design.

Submit
5. If a button is assigned  to the Form's Cancel property, the button can be clicked by typing the Esc key

Explanation

When a button is assigned to the Form's Cancel property, it means that the button is designated as the cancel button for the form. This allows the button to be activated by pressing the Esc key on the keyboard. So, the statement "If a button is assigned to the Form's Cancel property, the button can be clicked by typing the Esc key" is true.

Submit
6. The condition in an If structure must always evaluate to _____.  

Explanation

The condition in an If structure must always evaluate to either true or false. This is because the If structure is used to make decisions based on whether a certain condition is true or false. If the condition evaluates to true, the code block inside the If structure will be executed, otherwise it will be skipped. Therefore, the condition must always result in a boolean value, either true or false.

Submit
7. The following statement is a syntax error: sum = sum + 1

Explanation

The given statement "sum = sum + 1" is not a syntax error. It is a valid statement in many programming languages, including Python. This statement is used to increment the value of the variable "sum" by 1. It adds 1 to the current value of "sum" and assigns the result back to "sum". Therefore, the correct answer is False.

Submit
8. The section of a program where a variable is usable is the variable's

Explanation

The scope of a variable refers to the portion of the program where the variable is accessible and can be used. It determines the visibility and lifetime of the variable. Therefore, the correct answer is "scope".

Submit
9. An If statement always needs an Else statement.

Explanation

We've coded many conditions of If statements with just a Then.

Submit
10. String comparisons are always case sensitive

Explanation

Which means ...
If "Giants" = "giants"
Is not true

Submit
11. When comparing these two strings, the expression "Zebra" < "aardvark" is...

Explanation

The expression "Zebra"

Submit
12. When keyboard input is directed into a text box, the text box is said to have

Explanation

When keyboard input is directed into a text box, the text box is said to have "focus". This means that the text box is actively selected and ready to receive input from the keyboard. The concept of focus is important in user interface design as it helps users understand which element is currently active and where their input will be directed.

Submit
13. The comparison that checks if a variable called intAge is at least 18 is:

Explanation

The correct answer is "If intAge >= 18 Then" because the comparison operator ">=" checks if the value of the variable intAge is greater than or equal to 18. This condition will be true if the value of intAge is 18 or any number greater than 18.

Submit
14. Consider the following code Dim intA as Integer = 6 Dim intB as Integer = 0 Dim intC as Integer = -1 Is the following expression true or false? If int A < int B OR intC < int B Then

Explanation

The expression is true because at least one of the conditions is true. Since intA is not less than intB, the first condition is false. However, intC is less than intB, so the second condition is true. Since the expression uses the OR operator, only one of the conditions needs to be true for the overall expression to be true.

Submit
View My Results

Quiz Review Timeline (Updated): Mar 19, 2023 +

Our quizzes are rigorously reviewed, monitored and continuously updated by our expert board to maintain accuracy, relevance, and timeliness.

  • Current Version
  • Mar 19, 2023
    Quiz Edited by
    ProProfs Editorial Team
  • Oct 24, 2014
    Quiz Created by
    KretschK
Cancel
  • All
    All (14)
  • Unanswered
    Unanswered ()
  • Answered
    Answered ()
What is the result of the following expression?      ...
Which of the following is not a legal variable name?
What is the result of the following expression?Dim m as Integer = 3Dim...
It is generally a good idea to use many  fonts on a form
If a button is assigned  to the Form's Cancel property, the...
The condition in an If structure must always evaluate to _____. ...
The following statement is a syntax error: sum = sum + 1
The section of a program where a variable is usable is the...
An If statement always needs an Else statement.
String comparisons are always case sensitive
When comparing these two strings, the expression "Zebra"...
When keyboard input is directed into a text box, the text box is said...
The comparison that checks if a variable called intAge is at least 18...
Consider the following code ...
Alert!

Advertisement