CIS22A CH1
In modern computer systems, a byte consists of _____ bits.
8
When a program runs on a computer, the part of the computer that carries out the instructions is called the _____.
CPU
When a program runs on a computer, it is stored in _____.
RAM
Replace the underlines with the words in parentheses that follow: The ____ solves the ____ of a ____ by expressing an ____ in a ____ to make a ____ that can run on a ____.
The PROGRAMMER solves the PROBLEMS of a USER by expressing an ALGORITHM in a PROGRAMMING LANGUAGE to make a PROGRAM that can run on a COMPUTER.
Which of the following is not true? a) An algorithm allows ambiguity. b) An algorithm, when carried out, must eventually stop. c) An algorithm, can be carried out by a human being.
a) An algorithm allows ambiguity.
When a program is not running, it is stored a) on a disk. b) in level-2 cache (L2). c) in main memory. d) on the ethernet or wifi.
a) on a disk.
A byte in memory is identified by a unique number called its _____.
address
Which statement is NOT true: a) Machine languages can be used to express algorithms. b) Machine languages can be used to write programs that can run on any machine. c) Machine language consists of zeros and ones. d) Machine language is produced by compilers.
b) Machine languages can be used to write programs that can run on any machine.
At each step of its operation, the input to a Central Processing Unit is a) a program. b) an instruction. c) main memory. d) a control unit.
b) an instruction.
Before a variable is used it must be a) defined b) declared c) included d) evaluated e) assigned
b) declared (note that there is some inconsistency in terminology in C and C++ books and some authors use the term "defined" as well. There are subtle distinction between the terms that are beyond the scope of this chapter.)
Application software a) processes applications for jobs, school admission, etc. b) is any software that is runs with the support of the operating system. c) was invented by Microsoft. d) is applied to the computer for the purpose of running the operating system. e) none of the above.
b) is any software that is runs with the support of the operating system.
A binary digit a) is either positive or negative. b) is zero or one. c) requires one byte of storage. d) is 2. e) is none of the above.
b) is zero or one.
Which of these is not a programming language? a) C b) C++ c) HTML d) Java
c) HTML
A compiler a) maintains a collection of programs b) tests a program's logic c) translates source code into executable code d) translates executable code to machine code
c) translates source code into executable code
RAM, random-access memory, is called that because a) it is optimized for random number processing. b) accesses are randomized to prevent clogging the control lines. c) you can pick any two random locations and it will take the same time to access the data. d) when power is turned off, its contents are lost and replaced by random bits. e) none of the above.
c) you can pick any two random locations and it will take the same time to access the data.
An error in a program that involves a violation of language rules will be detected at _____ time.
compile
What best defines a "programming language"? a) It allows us to control a computer. b) It allows us to make a calculation. c) It allows to execute a program. d) It allows us to express an algorithm.
d) It allows us to express an algorithm.
Which of the following is true? a) There is exactly one and only one statement on each line of code. b) There can be more than one statement on a line, but a statement must not extend over more than one line. c) Statements can extend over more than one line but there must not be more than one statement on a line. d) There are no language rules regarding statements and line in general.
d) There are no language rules regarding statements and line in general.
An operating system a) is the chief hardware unit in a computer. b) is loaded into the computer each time it needs to carry out an operation. c) ensures that programs will not run on the computer at the same time. d) allocates resources like memory to programs that are running. e) all of the above.
d) allocates resources like memory to programs that are running.
A bit is a) a metalic rod inserted into a horses mouth to control it while riding. b) a small amount of data. c) an alternative term for byte. d) an electronic device used in computers. e) a binary digit, like 0 or 1.
e) a binary digit, like 0 or 1.
Mice, trackpads, keyboards, scanners, joysticks are all examples of _____ devices.
input
Words that have a special meaning in a programming language are called .
keywords
The purpose of testing a program with different combinations of data is to expose run-time and _____ errors.
logical
Compilers translate the instructions written by the programmer into _____ code.
object
Monitors, printers, status lights are all examples of _____ devices.
output
The ability of a language to let a programmer develop a program on computer system that can be run on other systems is called ______ .
portability
Division by zero when the program is executing is an example of a _____ error.
runtime
Flash drives, CDs, external disks are all examples of _____ storage (memory) devices.
secondary
The code that a programmer writes is called _____ code.
source
The rules that govern the correct order and usage of the elements of a language are called the _____ of the language.
syntax
A location in memory used for storing data and given a name in a computer program is called a _____ because the data in the location can be changed.
variable