C++ Chapter 2 Quiz Test

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 Morningraisin
M
Morningraisin
Community Contributor
Quizzes Created: 1 | Total Attempts: 512
Questions: 15 | Attempts: 512

SettingsSettingsSettings
C++ Chapter 2 Quiz Test - Quiz

Chapter 2 Quiz/Review Sheet/Test Whatever. From Hanna to Jono


Questions and Answers
  • 1. 

    How many bits are there in a byte?

    • A.

      3

    • B.

      12

    • C.

      8

    • D.

      1

    • E.

      24

    Correct Answer
    C. 8
    Explanation
    A byte is a unit of digital information that typically consists of 8 bits. Each bit can be either a 0 or a 1, representing binary data. Therefore, there are 8 bits in a byte.

    Rate this question:

  • 2. 

    What is data?

    • A.

      Computer representation of scientific facts.

    • B.

      The arrangement of the binary number system.

    • C.

      Something that can be measured.

    • D.

      Computer representation of something that exists in the real world.

    Correct Answer
    D. Computer representation of something that exists in the real world.
    Explanation
    The correct answer is "Computer representation of something that exists in the real world." This is because data refers to information or facts that are collected, organized, and stored in a computer system. It can represent various aspects of the real world, such as numbers, text, images, or any other form of information that can be processed by a computer. The other options mentioned in the question do not fully capture the essence of data as a representation of real-world information.

    Rate this question:

  • 3. 

    What does the microprocessor do?

    • A.

      The device that executes machine language instructions.

    • B.

      Kills people.

    • C.

      Reads the code the programmer writes and assembles a machine language program based on those codes.

    • D.

      Debugs runtime errors.

    Correct Answer
    A. The device that executes machine language instructions.
    Explanation
    The microprocessor is a device that executes machine language instructions. It reads the code that the programmer writes and assembles a machine language program based on those codes. It is responsible for processing and executing instructions, performing calculations, and controlling the operations of a computer system.

    Rate this question:

  • 4. 

    What is an example of a low level language?

    • A.

      Binary code

    • B.

      BASIC

    • C.

      Pascal

    • D.

      C++

    Correct Answer
    A. Binary code
    Explanation
    Binary code is an example of a low-level language because it directly represents machine instructions and is closely tied to the hardware architecture of a computer. It consists of 0s and 1s, representing the on and off states of electronic switches in a computer. Unlike high-level languages, binary code is not human-readable and requires a deep understanding of computer architecture to write and understand. It provides direct control over the hardware, making it efficient but also more difficult to work with compared to high-level languages.

    Rate this question:

  • 5. 

    What is the definition of a digital device?

    • A.

      Something that uses quantities that are avaliable or exist in a range.

    • B.

      Something that uses switches in combinination to represent something in the real world.

    Correct Answer
    B. Something that uses switches in combinination to represent something in the real world.
    Explanation
    The correct answer is "Something that uses switches in combination to represent something in the real world." This definition accurately describes a digital device as it highlights the use of switches to represent real-world information. Digital devices, such as computers and smartphones, use binary code (represented by switches) to process and transmit data, enabling them to perform various tasks and functions. This definition distinguishes digital devices from analog devices that use continuous signals to represent information.

    Rate this question:

  • 6. 

    What is the definition of an analog device?

    • A.

      Something that uses quantities that are avaliable or exist in a range.

    • B.

      Something that uses switches in combinination to represent something in the real world.

    Correct Answer
    A. Something that uses quantities that are avaliable or exist in a range.
    Explanation
    An analog device refers to something that utilizes quantities that are available or exist within a range. This implies that the device operates based on continuous variables rather than discrete values. Unlike digital devices that use switches to represent information, analog devices work with a continuous signal that can have infinite values within a given range. Therefore, the correct answer accurately defines an analog device as one that employs quantities within a range rather than using switches to represent real-world information.

    Rate this question:

  • 7. 

    Name two advantages of low level languages and two advantages of high level languages.

  • 8. 

    What is an interpreter?

    • A.

      Files saved by a text editer in ASCII format.

    • B.

      Program that translates the source code of a high level language into machine language. Every time a program written in an interpreted language needs to be inerpreted, the interpreter must once again translate each instruction.

    • C.

      A program that translates the source code of a high level language into machine language. The interpreter makes the translation onces, then saves the machine language so that the instructions do not have to be translated each time.

    Correct Answer
    B. Program that translates the source code of a high level language into machine language. Every time a program written in an interpreted language needs to be inerpreted, the interpreter must once again translate each instruction.
    Explanation
    The correct answer is a program that translates the source code of a high-level language into machine language. An interpreter is responsible for translating the code each time it is run, which means that the instructions are not saved and must be translated again for every execution of the program.

    Rate this question:

  • 9. 

    Which of the answers in question 10 are the definition of a compiler?

    • A.

      A

    • B.

      B

    • C.

      C

    Correct Answer
    C. C
    Explanation
    Answer C is the definition of a compiler.

    Rate this question:

  • 10. 

    Fill in the blank for the steps involved in using a compiler.Source code -> compiler -> __________ -> linker -> executable code

    • A.

      Object code

    • B.

      Interpreter

    • C.

      C++

    Correct Answer
    A. Object code
    Explanation
    After the source code is written, it is passed through a compiler which translates the code into object code. The object code is a low-level representation of the source code that can be understood by the computer. The object code is then passed to the linker, which combines it with other necessary libraries and modules to create the final executable code. Therefore, the correct step to fill in the blank is "object code".

    Rate this question:

  • 11. 

    What is an algorithm?

    • A.

      A graphic user interface, a system used for interacting with the computer user through pictures.

    • B.

      Set of sequential instructions that are followed to solve a problem.

    • C.

      The part of the computer that stores random access memory.

    Correct Answer
    B. Set of sequential instructions that are followed to solve a problem.
    Explanation
    An algorithm refers to a set of sequential instructions that are followed in order to solve a problem. It is a step-by-step procedure or a well-defined computational procedure that takes an input and produces an output. Algorithms can be used in various fields such as computer science, mathematics, and engineering to solve complex problems efficiently and effectively. By following a specific set of instructions, algorithms provide a systematic approach to finding solutions and are essential in the development of software and computer programs.

    Rate this question:

  • 12. 

    Name the five steps of the programming process.

  • 13. 

    What is a runtime error or a crash?

    • A.

      A type of error that can cause your program to stop running.

    • B.

      Instructions that fail.

    • C.

      A set of sequential instructions.

    • D.

      Flying squirrels.

    Correct Answer
    A. A type of error that can cause your program to stop running.
    Explanation
    A runtime error or a crash refers to a type of error that can cause a program to abruptly stop running. It occurs when there is an issue during the execution of the program, such as accessing invalid memory, dividing by zero, or encountering an infinite loop. These errors can cause the program to terminate unexpectedly, resulting in a crash or an abnormal termination of the program's execution.

    Rate this question:

  • 14. 

    What is a syntax error?

    • A.

      An error caused by moths flying into vacuum tubes.

    • B.

      When program a command that the computer cannot execute.

    • C.

      An error that occurs when you key a command or some other part of the program incorrectly.

    Correct Answer
    C. An error that occurs when you key a command or some other part of the program incorrectly.
    Explanation
    A syntax error is an error that occurs when you input a command or any other part of the program incorrectly. It refers to mistakes in the syntax or structure of the code that prevent the computer from understanding and executing the command properly. This can include misspelled keywords, missing or misplaced punctuation, or incorrect formatting. Syntax errors are common in programming and need to be fixed in order for the program to run correctly.

    Rate this question:

  • 15. 

    What is the purpose of documentation inside a program?

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 22, 2023
    Quiz Edited by
    ProProfs Editorial Team
  • Feb 28, 2010
    Quiz Created by
    Morningraisin
Back to Top Back to top
Advertisement
×

Wait!
Here's an interesting quiz for you.

We have other quizzes matching your interest.