QBasic Programming Quiz Questions And Answers

Reviewed by Godwin Iheuwa
Godwin Iheuwa, MS (Computer Science) |
Database Administrator
Review Board Member
Godwin Iheuwa, a Database Administrator at MTN Nigeria, holds an MS in Computer Science, specializing in Agile Methodologies and Database Administration from the University of Bedfordshire and a Bachelor's in Computer Science from the University of Port Harcourt. His proficiency in SQL Server Integration Services (SSIS) and SQL Server Management Studio contributes to his expertise in database management.
, MS (Computer Science)
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 Dedcentre
D
Dedcentre
Community Contributor
Quizzes Created: 6 | Total Attempts: 79,143
Questions: 15 | Attempts: 18,979

SettingsSettingsSettings
QBasic Programming Quiz Questions And Answers - Quiz

Are you ready to attempt these QBasic programming quiz questions and answers? Yes, this is a quiz which is about QBasic programming. Do you know a lot about this? This is the time to prove your understanding of it. Try to answer these given questions. After the quiz, if you somehow manage to get a score above 70%, then you can consider yourself to have passed this test. Let's go now!


Questions and Answers
  • 1. 

    What will the following code produce? PRINT "Afrikom Computer School"

    • A.

      A paper printed with Afrikom Computer School

    • B.

      A screen printed with Afrikom Computer School

    • C.

      None of the above

    • D.

      An error indicated on the screen

    Correct Answer
    B. A screen printed with Afrikom Computer School
    Explanation
    The code will produce a screen printed with "Afrikom Computer School" because the PRINT statement is typically used to display output on the screen.

    Rate this question:

  • 2. 

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

    • A.

      Strings

    • B.

      Syntax

    • C.

      Grammar

    • D.

      All of the above

    Correct Answer
    B. Syntax
    Explanation
    QBasic follows syntax as its counterpart. Syntax refers to the set of rules and formats that need to be followed in a programming language to write correct and meaningful code. Just like English language follows grammar rules, QBasic follows syntax rules to ensure that the code is structured correctly and can be understood by the computer. Therefore, syntax is the correct answer in this context.

    Rate this question:

  • 3. 

    "Name$" is known as a 

    • A.

      Stringer

    • B.

      Constant

    • C.

      Variable

    • D.

      Input driver

    Correct Answer
    C. Variable
    Explanation
    In QBasic, variable names can be followed by a suffix to denote their data type. In this case, "Name$" indicates a variable named "Name" that is of type string. The "$" symbol is used to specify that the variable will store string data. Therefore, "Name$" is a string variable in QBasic.

    Rate this question:

  • 4. 

    Text that you wish to appear on the screen while your program runs must appear inside of ---------------------

    • A.

      Slashes

    • B.

      Brackets

    • C.

      Quotes

    • D.

      Braces

    Correct Answer
    C. Quotes
    Explanation
    The correct answer is "quotes" because when writing code, text that is meant to appear on the screen while the program runs is typically enclosed within quotation marks. This is a common convention in many programming languages. The use of slashes, brackets, or braces is not typically used for this purpose in programming.

    Rate this question:

  • 5. 

    What must you do if a "Syntax Error" appears?

    • A.

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

    • B.

      Close the program

    • C.

      Delete it

    • D.

      None of the above

    Correct Answer
    A. Check for flaws, edit, and rerun. It may be a programmer's error.
    Explanation
    If "Syntax Error" appears, it means that there is a mistake in the code that does not conform to the programming language's syntax rules. To resolve this issue, the programmer should check for any flaws or mistakes in the code, make the necessary edits to fix the syntax error, and then rerun the program to see if the error is resolved. It is important to note that a syntax error is typically a mistake made by the programmer while writing the code, so they need to review and correct their own errors.

    Rate this question:

  • 6. 

    A computer program is simply:

    • A.

      An exercise of the brain

    • B.

      A set of instructions to tell a computer how to perform a particular task

    • C.

      Pairs of computer system

    • D.

      None of the above

    Correct Answer
    B. A set of instructions to tell a computer how to perform a particular task
    Explanation
    The correct answer is "A set of instructions to tell a computer how to perform a particular task." A computer program is a collection of instructions that are written in a specific programming language to guide a computer in executing a specific task or set of tasks. These instructions can include algorithms, functions, and logical statements that direct the computer's operations and manipulate data. The purpose of a computer program is to solve problems or automate processes by providing step-by-step instructions to the computer.

    Rate this question:

  • 7. 

    An algorithm is:

    • A.

      The output of the instruction to the computer.

    • B.

      The required data to be processed.

    • C.

      A finite sequence (or series) of precise instructions for solving a problem.

    • D.

      Problem definition

    Correct Answer
    C. A finite sequence (or series) of precise instructions for solving a problem.
    Explanation
    The correct answer is "A finite sequence (or series) of precise instructions for solving a problem." This is because an algorithm is a step-by-step procedure or set of rules that defines how to solve a specific problem or perform a specific task. It is a systematic approach that provides a clear and unambiguous set of instructions to solve a problem. The other options, such as the output of the instruction or the required data, are not accurate definitions of an algorithm.

    Rate this question:

  • 8. 

    The following symbols are used in flowcharting, except:

    • A.

      The terminal symbol

    • B.

      The process symbol

    • C.

      The input/output symbol

    • D.

      The cross symbol

    Correct Answer
    D. The cross symbol
    Explanation
    The cross symbol is not used in flowcharting. Flowcharts typically use symbols such as the terminal symbol to represent the start and end points of a process, the process symbol to represent a specific action or task, and the input/output symbol to represent the input or output of data. However, the cross symbol does not have a standard meaning or usage in flowcharting and is therefore not included as a symbol.

    Rate this question:

  • 9. 

    The following are types of errors in programming, except:

    • A.

      Grammar error

    • B.

      Syntax error

    • C.

      Logic error

    • D.

      Compile error

    Correct Answer
    A. Grammar error
    Explanation
    The given question is about the types of errors in programming, and the correct answer is "Grammar error." In programming, a grammar error refers to a mistake in the syntax or structure of the code, which violates the rules of the programming language. Syntax error, logic error, and compile error are all types of errors commonly encountered in programming. A syntax error occurs when the code does not follow the correct syntax of the programming language. Logic error refers to a mistake in the program's algorithm or logic, leading to incorrect output. Compile error occurs during the compilation process when the code cannot be translated into machine language.

    Rate this question:

  • 10. 

    What will be the output of the following code? 10 REM EXAMPLE OF HOW A COMMA 20 REM AFFECTS THE OUTPUT 30 REM PRINT STATEMENT 40 PRINT  “4 + 7 = ”, 50 PRINT  4 + 7 60 PRINT END

    • A.

      4 + 7

    • B.

      4 + 7 = 11

    • C.

      11

    • D.

      All of the above

    Correct Answer
    B. 4 + 7 = 11
    Explanation
    The code is using the PRINT statement to display the result of the expression "4 + 7". The comma after the first PRINT statement is used to separate the output. As a result, the output will be displayed on the same line. The first line will display "4 + 7 =", and the second line will display the result of the expression, which is "11". Therefore, the correct answer is "4 + 7 = 11".

    Rate this question:

  • 11. 

    The CLS statement:

    • A.

      Is to instruct the user to enter data

    • B.

      To enter data

    • C.

      Is used for clearing the screen.

    • D.

      All of the above

    Correct Answer
    C. Is used for clearing the screen.
    Explanation
    The CLS statement is used for clearing the screen. This statement is commonly used in programming languages to clear the output screen or console window. It helps to remove any existing text or data from the screen, providing a clean and empty display for new information to be presented. By using the CLS statement, the screen can be refreshed and made ready to display new data or messages to the user.

    Rate this question:

  • 12. 

    BASIC is a typical example of an interpreted language.  

    • A.

      True

    • B.

      False

    Correct Answer
    A. True
    Explanation
    BASIC is considered a typical example of an interpreted language because it is designed to be executed line by line, without the need for compilation. Interpreted languages like BASIC convert the source code into machine code at runtime, which allows for easier debugging and faster development. This is in contrast to compiled languages, which require the source code to be compiled into machine code before it can be executed. Therefore, it is accurate to say that BASIC is a typical example of an interpreted language.

    Rate this question:

  • 13. 

    What is the acronym for BASIC?

    • A.

      Beginner Action- Purpose Symbolic Instruction Code

    • B.

      Basic Algorithm Sequence Instruction of Computer

    • C.

      Beginner's All-Purpose Symbolic Instruction Code

    • D.

      None of the above

    Correct Answer
    C. Beginner's All-Purpose Symbolic Instruction Code
    Explanation
    The correct answer is Beginner's All-Purpose Symbolic Instruction Code. BASIC is an acronym that stands for Beginner's All-Purpose Symbolic Instruction Code. It is a high-level programming language that was designed to be easy to learn and use for beginners. It was widely used in the 1960s and 1970s and played a significant role in the early development of personal computers.

    Rate this question:

  • 14. 

    The following arithmetic operations are carried out in BASIC except

    • A.

      ^

    • B.

      *

    • C.

      +

    • D.

      X

    Correct Answer
    D. X
    Explanation
    In BASIC, the caret (^) is used for exponentiation, the asterisk (*) is used for multiplication, and the plus (+) is used for addition. However, the "x" symbol is not a valid arithmetic operator in BASIC. Therefore, the correct answer is "x" because it is not a valid arithmetic operation in BASIC.

    Rate this question:

  • 15. 

    This expression (a+b) 3  (raise to power 3) can be written in BASIC as follows:

    • A.

      (a+b)^3

    • B.

      (a+b)*(a+b)*(a+b)

    • C.

      Both as in A and B

    • D.

      (a+b)x(a+b)x(a+b)

    Correct Answer
    C. Both as in A and B
    Explanation
    The correct answer is "Both as in A and B." This is because both options A and B represent the expression (a+b) raised to the power of 3. Option A, (a+b)^3, uses the exponentiation operator to indicate raising to the power of 3. Option B, (a+b)*(a+b)*(a+b), represents the expression as the product of three identical terms, each being (a+b). Therefore, both options A and B are valid representations of the expression (a+b) 3 in BASIC.

    Rate this question:

Godwin Iheuwa |MS (Computer Science) |
Database Administrator
Godwin Iheuwa, a Database Administrator at MTN Nigeria, holds an MS in Computer Science, specializing in Agile Methodologies and Database Administration from the University of Bedfordshire and a Bachelor's in Computer Science from the University of Port Harcourt. His proficiency in SQL Server Integration Services (SSIS) and SQL Server Management Studio contributes to his expertise in database management.

Quiz Review Timeline +

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

  • Current Version
  • Jan 16, 2024
    Quiz Edited by
    ProProfs Editorial Team

    Expert Reviewed by
    Godwin Iheuwa
  • Jul 27, 2011
    Quiz Created by
    Dedcentre
Advertisement
×

Wait!
Here's an interesting quiz for you.

We have other quizzes matching your interest.