questions with complete solutions
Five Main Components of a Computer - correct answer ✔✔1. Input Devices
2. Output Devices
3. Processor (CPU)
4. Main Memory
5. Secondary Memory
Input Devices - correct answer ✔✔Allows communication to the computer
Output Devices - correct answer ✔✔Allows communication to the user
Processor (CPU) - correct answer ✔✔Central Processing Unit; follows program instructions
Main Memory - correct answer ✔✔Memory locations containing the running program
Secondary Memory - correct answer ✔✔Permanent record of data often on a disk
Compiler - correct answer ✔✔translate high-level language to machine language
Source Code - correct answer ✔✔the original program we write in a high level language (C++)
Object Code - correct answer ✔✔the translated version in machine language
Program Design Process - correct answer ✔✔1. Problem Solving Phase
2. Implementation Phase
, Problem Solving Phase - correct answer ✔✔Result is an algorithm that solves the problem
Implementation Phase - correct answer ✔✔Result is the algorithm translated into a programming
language
Variable Declarations - correct answer ✔✔identifies names of variables to name numbers
Program Statements - correct answer ✔✔performs a computation and sends value of variable to
monitor
Include Directives - correct answer ✔✔tells compiler where to find information about items used in the
program
Include Directives - correct answer ✔✔#include <iostream>, #include <cmath>,
#include <fstream>,
#include <iomanip>,
#include <cstdlib>
Program Errors - correct answer ✔✔1. Syntax Errors
2. Run-time Errors
3. Logic Errors
Syntax Errors - correct answer ✔✔violation of grammar rules of the language. discovered by the
compiler, and errors messages may not always show correct locations of errors
Run-time Errors - correct answer ✔✔error conditions detected by the computer at run-time
Logic Errors - correct answer ✔✔errors in the program's algorithm, most difficult to diagnose, and
computer does not recognize an error