Flashcards in Chapter 1 Deck (81):
A computer system consists of both ____ and ____.
Three major hardware components of a computer are _____, _______, and ______.
input/output devices, memory devices, central processing unit
A compiler translates a high-level language program to _________.
machine code or object code
The arithmetic-logic unit of a computer performs _____ and _______ operations.
Machine language instructions are fetched and decoded by the _______ unit.
Input/output operations are controlled by the ______ unit.
The input devices handle instructions and data in ______ form.
Common secondary storage decides are ________ and _______.
magnetic tape, magnetic disk
Programs written to manipulate data and solve problems are called ________ software.
The central processing unit consists of ________ and _________.
arithmetic and logic unit (ALU), control unit (CU)
The program in a computer system that manages the computer resources is called an ________ system.
Software programs permanently installed to control equipment are called _______.
In modular design the large problem is divided into _______.
What is the relationship between lower-level and higher -level modules in a hierarchy chart?
A lower level module describes a sub function of the higher level module that invokes it.
Modules must be tightly coupled. True or False?
What is an algorithm?
An algorithm is a procedure consisting of a number of precisely defined steps for solving a problem.
What is a program?
A program is a sequence of unambiguous, executable instructions written in a computer language.
Explain top-down design methodology.
Top-down design methodology begins with a general specification of an algorithm, then separates it into logical parts at ever more detailed levels.
Why is it important to validate algorithm design?
If the design is validated at each stage, it should not be necessary to start over.
What does an assignment instruction do?
An assignment statement copies a call into the memory location of a variable.
Name some different forms of computer output.
tape, disk, print, display, plot, device control
What are the fundamental types of instructions in any programming language?
input/output, move , arithmetic, control, logic
What kind of data can computers process decides numbers?
Information supplied to an application program is called ________.
Information supplied by an application program is called ________.
Data generated within a program that is not part of the output is called _______ data.
What is data validation?
checking that the data values are appropriate
What is pseudocode used for?
to describe the steps to be carried out by the computer in a semiformal verbal/mathematical form
What is a hierarchy chart used for?
to describe the functional analysis of the algorithm
What is a flowchart used for?
to describe the flow of control and types of operations involved in the algorithm
Why is the format of the output data important?
so that it is understandable, easy to read, and attractive
Why are reliability and efficiency important?
so that correct answers are produced within a reasonable time
What are control instructions used for?
to switch between sets of instructions depending on the logical comparison of data values
What does a compiler do?
A compiler converts source code to object code, checking for errors in grammar, spelling, and punctuation.
What does a linker do?
A linker links object code to modules from the system library.
The language in which the program is written is called __________ code.
The compilation process produces ________ code.
What does a loader do?
A loader stores the executable program into memory.
List the types of errors according to developmental stages.
Program Coding: logic errors
Program Compilation: grammatical and spelling errors
Program Execution: overflow, arithmetic errors, etc.
Give two reasons why documentation is important.
to help users use the program, to help programmers modify the program
The process of locating and correcting errors is called ____________.
Why is it important to test a program with data that intentionally contains errors?
to make sure the program detects erroneous data
What is meant by time-sharing?
Several users have access to the computer at the same time.
What is a batch-processing environment?
The operating system schedules and controls program execution
What is multiprogramming?
Several programs are in memory at the same time and take turns being executed.
A multiprocessing system will have more than one what?
Why is real-time processing important?
to automatically control equipment
Is interactive processing the same as real-time processing? Explain.
Interactive programming: a human user interacts with the processing.
Real-time processing: a piece of equipment interacts with the processing.
Why is programming for interactive processing different from programming for batch processing?
When programming for batch processing, input and output data are stored in files on a magnetic storage device.
T or F? C is a structured programming language because you can build programs with it.
T or F? In C there are three basic types of control structures.
T or F? A control structure tells the computer what kind of data to use.
T or F? In C every variable must be declared with a data type.
T or F? Some data cannot be represented by variables of types int, float, double, or char.
T or F? In C the main procedure must be the first function in the program.
The three basic control structures in C are _______, _______, and _______.
sequence, selection, repetition
C is a strongly __________ language.
The derived data types in C are _______, _______, and ________.
arrays, character strings, structures
In C the procedures are called __________.
In C there is always a __________ function.
T or F? Every variable in C must be declared.
T or F? A variable declared with data type double will be allocated four bytes of storage.
T or F? Derived data types are derived from basic or built-in data types.
T or F? A structure data type is a homogeneous data type.
T or F? An array is a heterogeneous data type.
T or F? Variables in C can be initialized when they are declared.
T or F? Named constants in C must be declared just like any other named variables.
Declare the following variables as integer variables.
i, j, k
max, min, ival, imax, jmax
int iter, counter;
int i, j, k;
int max, min, ival, imax, jmax;
Declare and initialize the following variables to the values specified.
max count to 50, i count to 20, value to 100
int maxcount = 50, count = 20, kvalue = 100;
Declare the following variables as floating-point variables.
balance, energy, power, voltage, current, acidity, phvalue
float balance, energy, power, voltage, current, acidity, phvalue;
Declare the following variables as character variables.
code, basic_colors, student_status, depth_code.
char code, basic_colors, student_status, depth_code;
Declare and define the following constants, giving them the obvious values.
three, plus, e, gravity
const int THREE = 3;
const char PLUS = '+';
const float E = 30.0E06; /* psi */
const float GRAVITY = 32.0; /* ft/sec sq*/
In C the built-in data types are ___________, _____________, ____________, and ____________.
int, float, double, char
In C the derived data types are _____________, __________, and __________.
array, string, structure
T or F? The order of precedence of arithmetic operators is important in the evaluation of a C expression.
T or F? Parentheses have the lowest order of precedence in evaluating a C expression.
T or F? The order of evaluation of the arithmetic operators is that division and/or multiplication is performed before addition and/or subtraction.
T or F? The order of evaluation of an expression with parentheses is the same as the order of evaluation of a non parenthesized expression.
T or F? When an algebraic expression is divided by another algebraic expression you must enclose each of the expressions with parentheses.
T or F? When an arithmetic operation involves a mixed data type, the simple data type is converted to the more complex data type, the arithmetic is carried out, and the result has the more complex data type.