QBasic Quiz

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 Baguyobenedict
B
Baguyobenedict
Community Contributor
Quizzes Created: 1 | Total Attempts: 1,771
Questions: 15 | Attempts: 1,774

SettingsSettingsSettings
Programming Quizzes & Trivia

Qbasic Quiz is a test made by Benedict Baguyo. Welcome!


Questions and Answers
  • 1. 

    If the following code was given, what would probably be the output screen? PRINT ((7+6-3*4)+2^3/2)+((7+6-3*4)+2^3/2)+((7+6-3*4)+2^3/2)+((7+6-3*4)+2*3/2)+((7+6*3-4)-2^0/1)

    • A.

      15

    • B.

      ((7+6-3*4)+2*3/2)+((7+6-3*4)+2*3/2)+((7+6-3*4)+2*3/2)+((7+6-3*4)+2*3/2)

    • C.

      27

    Correct Answer
    A. 15
    Explanation
    The code evaluates an arithmetic expression and prints the result. The expression consists of multiple additions, subtractions, multiplications, divisions, and exponentiations. The order of operations is followed, so the exponentiation is performed first, followed by multiplication and division, and finally addition and subtraction. The expression is evaluated from left to right, so the first part of the expression is (7+6-3*4)+2^3/2, which equals 15. The second part of the expression is the same as the first part, so it also equals 15. Therefore, the output screen would probably display "15".

    Rate this question:

  • 2. 

    What does MOD mean?

    • A.

      Modulus Division

    • B.

      Modular Division

    Correct Answer
    B. Modular Division
    Explanation
    Modular Division, also known as Modulus Division, is a mathematical operation that calculates the remainder when one number is divided by another. It is denoted by the symbol "%". This operation is commonly used in computer programming and is particularly useful when dealing with cyclic or periodic patterns. Therefore, the correct answer for the given question is "Modular Division".

    Rate this question:

  • 3. 

    What will the following code produce?          PRINT "Hi"

    • A.

      A paper printed with "Hi"

    • B.

      A screen showing "Hi"

    Correct Answer
    B. A screen showing "Hi"
    Explanation
    The given code will produce a screen showing "Hi". The PRINT statement is commonly used in programming languages to display output on the screen. In this case, the code is instructing the computer to print the text "Hi". Therefore, when the code is executed, the output will be displayed on the screen rather than being printed on a physical paper.

    Rate this question:

  • 4. 

    What will this code produce? firstword$ = "book" secondword$ = "keeper" PRINT firstword$ + secondword$

    • A.

      An output screen with: "bookkeeper"

    • B.

      An output screen with: firstword$ + secondword$

    Correct Answer
    A. An output screen with: "bookkeeper"
    Explanation
    The given code will produce an output screen with the text "bookkeeper". This is because the code concatenates the values of the variables "firstword$" and "secondword$" using the "+" operator and then prints the result. The values of the variables are "book" and "keeper" respectively, so when they are concatenated, the result is "bookkeeper".

    Rate this question:

  • 5. 

    What is the purpose of Qbasic?

    • A.

      As a replacement of GW-BASIC

    • B.

      To combat the needs for a better software in the 1980s, like better graphics, better graphical user interface, and faster programs

    Correct Answer
    A. As a replacement of GW-BASIC
    Explanation
    QBasic was developed as a replacement for GW-BASIC, which was a programming language used in the 1980s. QBasic aimed to address the shortcomings of GW-BASIC by providing better graphics, a more user-friendly graphical user interface, and faster program execution. Therefore, the purpose of QBasic was to offer an improved and updated version of GW-BASIC to meet the evolving needs of software development in the 1980s.

    Rate this question:

  • 6. 

    What does OS mean?

    • A.

      Operation System

    • B.

      Operating System

    Correct Answer
    B. Operating System
    Explanation
    An operating system (OS) is a software that manages computer hardware and software resources and provides common services for computer programs. It acts as an intermediary between the user and the computer hardware, allowing users to interact with the computer and run applications. Therefore, "Operating System" is the correct answer as it accurately defines the term "OS".

    Rate this question:

  • 7. 

    If the English language follows formats and rules on grammar, what does QBasic follow as counterpart?

    • A.

      Strings

    • B.

      Syntax

    Correct Answer
    B. Syntax
    Explanation
    QBasic follows syntax as its counterpart. Syntax refers to the set of rules and structures that dictate how a programming language should be written. Just like how English language has formats and rules on grammar, QBasic has its own set of syntax rules that define how the code should be written in order for it to be valid and executable. These syntax rules include guidelines on punctuation, keywords, variable declarations, and overall structure of the program.

    Rate this question:

  • 8. 

    What must you do if "Syntax Error" appears?

    • A.

      Check for flaws, edit, and rerun. It may be a programmer's error.

    • B.

      Delete it. It is a virus, maybe passed on from one computer to another, or through the Internet. Get the latest version of anti-virus. Disconnect Internet connections.

    Correct Answer
    A. Check for flaws, edit, and rerun. It may be a programmer's error.
    Explanation
    If "Syntax Error" appears, the correct course of action is to check for flaws, edit the code to correct any errors, and then rerun the program. This error typically occurs when there is a mistake in the programming code, such as a misspelled keyword or a missing punctuation mark. By reviewing the code and making necessary edits, the programmer can fix the error and rerun the program to ensure it runs correctly. Deleting the code or assuming it is a virus is not the appropriate response in this situation.

    Rate this question:

  • 9. 

    If a program does not stop from looping, what will you probably do?

    • A.

      Press CTRL+ALT+DEL, to open Task Manager, click "Processes", and look for cmd.exe and ends it.

    • B.

      Press CTRL+C, because "C" means "Close"

    Correct Answer
    B. Press CTRL+C, because "C" means "Close"
    Explanation
    Pressing CTRL+C is the correct answer because it is a commonly used keyboard shortcut in many programming environments to interrupt or terminate a running program. In this context, "C" does not necessarily mean "Close" but rather represents the keyboard key "C" which is used to send an interrupt signal to the program, causing it to stop execution. This is a standard way to stop a program from looping indefinitely and regain control of the system.

    Rate this question:

  • 10. 

    Press "A" to proceed, "B" to exit. Answer: = The program asks for an answer. Suppose the user entered a. What do you think would happen?

    • A.

      The program will proceed. The "a" can be understood already by the QBasic program as only capitalization matters. The variable names are not case-sensitive, though.

    • B.

      The program will neither proceed nor exit. There are no choices that match "a". Capitalization is important nowadays. It is a primary instruction for us to capitalize what should be capitalized.

    Correct Answer
    B. The program will neither proceed nor exit. There are no choices that match "a". Capitalization is important nowadays. It is a primary instruction for us to capitalize what should be capitalized.
  • 11. 

    If your grandmother is still living, how would you explain how to use QBasic to her?

  • 12. 

    There are 4 women who want to cross a bridge. They all begin on the same side. You have 17 minutes to get all of them across to the other side. It is night. There is one flashlight. A maximum of two people can cross at one time. Any party who crosses, either 1 or 2 people, must have the flashlight with them. The flashlight must be walked back and forth, it cannot be thrown, etc. Each woman walks at a different speed. A pair must walk together at the rate of the slower woman's pace.Woman 1: 1 minute to cross Woman 2: 2 minutes to cross Woman 3: 5 minutes to cross Woman 4: 10 minutes to cross For example if Woman 1 and Woman 4 walk across first, 10 minutes have elapsed when they get to the other side of the bridge. If Woman 4 then returns with the flashlight, a total of 20 minutes have passed and you have failed the mission. What is the order required to get all women across in 17 minutes? Now, what's the other way?

  • 13. 

    If you could add any feature to Microsoft Word, what would it be?

  • 14. 

    What do you think ARE the significances of knowing how to program? Do you think it can add color and effect to you as a person? If so, by how? Will it be capable of changing your life? How can you apply programming in your life?

  • 15. 

    What was the hardest question asked of you so far today?

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 21, 2023
    Quiz Edited by
    ProProfs Editorial Team
  • Mar 04, 2009
    Quiz Created by
    Baguyobenedict
Back to Top Back to top
Advertisement
×

Wait!
Here's an interesting quiz for you.

We have other quizzes matching your interest.