First Quarterly Practice Test (Vb)

Approved & Edited by ProProfs Editorial Team
The editorial team at ProProfs Quizzes consists of a select group of subject experts, trivia writers, and quiz masters who have authored over 10,000 quizzes taken by more than 100 million users. This team includes our in-house seasoned quiz moderators and subject matter experts. Our editorial experts, spread across the world, are rigorously trained using our comprehensive guidelines to ensure that you receive the highest quality quizzes.
Learn about Our Editorial Process
| By KretschK
K
KretschK
Community Contributor
Quizzes Created: 9 | Total Attempts: 6,977
Questions: 14 | Attempts: 83

SettingsSettingsSettings
First Quarterly Practice Test (Vb) - Quiz

Questions and Answers
  • 1. 

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

    • A.

      True

    • B.

      False

    Correct Answer
    A. True
    Explanation
    The expression "Zebra" < "aardvark" is true because in alphabetical order, "Zebra" comes before "aardvark". The comparison is based on the Unicode value of each character, and since "Z" has a smaller Unicode value than "a", "Zebra" is considered to be less than "aardvark".

    Rate this question:

  • 2. 

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

    • A.

      If intAge > 18 Then

    • B.

      If intAge

    • C.

      If intAge >= 18 Then

    • D.

      If IntAge < 18 Then

    Correct Answer
    C. If intAge >= 18 Then
    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.

    Rate this question:

  • 3. 

    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

    • A.

      True

    • B.

      False

    Correct Answer
    A. True
    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.

    Rate this question:

  • 4. 

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

    • A.

      0 or 1

    • B.

      -1 or 0

    • C.

      Negative or positive

    • D.

      True or false

    Correct Answer
    D. True or false
    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.

    Rate this question:

  • 5. 

    An If statement always needs an Else statement.

    • A.

      True

    • B.

      False

    Correct Answer
    B. False
    Explanation
    We've coded many conditions of If statements with just a Then.

    Rate this question:

  • 6. 

    String comparisons are always case sensitive

    • A.

      True

    • B.

      False

    Correct Answer
    A. True
    Explanation
    Which means ...
    If "Giants" = "giants"
    Is not true

    Rate this question:

  • 7. 

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

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

    Rate this question:

  • 8. 

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

    • A.

      True

    • B.

      False

    Correct Answer
    B. False
    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.

    Rate this question:

  • 9. 

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

    • A.

      True

    • B.

      False

    Correct Answer
    A. True
    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.

    Rate this question:

  • 10. 

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

    • A.

      True

    • B.

      False

    Correct Answer
    B. False
    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.

    Rate this question:

  • 11. 

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

    • A.

      Focus

    • B.

      Access

    • C.

      Scope

    • D.

      Tab

    Correct Answer
    A. Focus
    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.

    Rate this question:

  • 12. 

    Which of the following is not a legal variable name?

    • A.

      IntAge

    • B.

      DblPi

    • C.

      #tag

    • D.

      Bmi

    Correct Answer
    C. #tag
    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.

    Rate this question:

  • 13. 

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

    • A.

      Focus

    • B.

      Access

    • C.

      Scope

    • D.

      Tab

    Correct Answer
    C. Scope
    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".

    Rate this question:

  • 14. 

    What is the result of the following expression?        60 Mod 7

    Correct Answer
    4
    Explanation
    Mod means remainder. 60 divided by 7 is 8 remainder 4

    Rate this question:

Quiz Review Timeline +

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
Back to Top Back to top
Advertisement
×

Wait!
Here's an interesting quiz for you.

We have other quizzes matching your interest.