Chapter 1 Flashcards Preview

CS 130 > Chapter 1 > Flashcards

Flashcards in Chapter 1 Deck (81):
1

A computer system consists of both ____ and ____.

software, hardware

2

Three major hardware components of a computer are _____, _______, and ______.

input/output devices, memory devices, central processing unit

3

A compiler translates a high-level language program to _________.

machine code or object code

4

The arithmetic-logic unit of a computer performs _____ and _______ operations.

arithmetic, logic

5

Machine language instructions are fetched and decoded by the _______ unit.

control

6

Input/output operations are controlled by the ______ unit.

central processing

7

The input devices handle instructions and data in ______ form.

character

8

Common secondary storage decides are ________ and _______.

magnetic tape, magnetic disk

9

Programs written to manipulate data and solve problems are called ________ software.

application

10

The central processing unit consists of ________ and _________.

arithmetic and logic unit (ALU), control unit (CU)

11

The program in a computer system that manages the computer resources is called an ________ system.

operating

12

Software programs permanently installed to control equipment are called _______.

firmware

13

In modular design the large problem is divided into _______.

subproblems

14

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.

15

Modules must be tightly coupled. True or False?

False

16

What is an algorithm?

An algorithm is a procedure consisting of a number of precisely defined steps for solving a problem.

17

What is a program?

A program is a sequence of unambiguous, executable instructions written in a computer language.

18

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.

19

Why is it important to validate algorithm design?

If the design is validated at each stage, it should not be necessary to start over.

20

What does an assignment instruction do?

An assignment statement copies a call into the memory location of a variable.

21

Name some different forms of computer output.

tape, disk, print, display, plot, device control

22

What are the fundamental types of instructions in any programming language?

input/output, move , arithmetic, control, logic

23

What kind of data can computers process decides numbers?

character

24

Information supplied to an application program is called ________.

input data

25

Information supplied by an application program is called ________.

output data

26

Data generated within a program that is not part of the output is called _______ data.

internal

27

What is data validation?

checking that the data values are appropriate

28

What is pseudocode used for?

to describe the steps to be carried out by the computer in a semiformal verbal/mathematical form

29

What is a hierarchy chart used for?

to describe the functional analysis of the algorithm

30

What is a flowchart used for?

to describe the flow of control and types of operations involved in the algorithm

31

Why is the format of the output data important?

so that it is understandable, easy to read, and attractive

32

Why are reliability and efficiency important?

so that correct answers are produced within a reasonable time

33

What are control instructions used for?

to switch between sets of instructions depending on the logical comparison of data values

34

What does a compiler do?

A compiler converts source code to object code, checking for errors in grammar, spelling, and punctuation.

35

What does a linker do?

A linker links object code to modules from the system library.

36

The language in which the program is written is called __________ code.

Source

37

The compilation process produces ________ code.

Object

38

What does a loader do?

A loader stores the executable program into memory.

39

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.

40

Give two reasons why documentation is important.

to help users use the program, to help programmers modify the program

41

The process of locating and correcting errors is called ____________.

debugging

42

Why is it important to test a program with data that intentionally contains errors?

to make sure the program detects erroneous data

43

What is meant by time-sharing?

Several users have access to the computer at the same time.

44

What is a batch-processing environment?

The operating system schedules and controls program execution

45

What is multiprogramming?

Several programs are in memory at the same time and take turns being executed.

46

A multiprocessing system will have more than one what?

CPU

47

Why is real-time processing important?

to automatically control equipment

48

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.

49

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.

50

T or F? C is a structured programming language because you can build programs with it.

False

51

T or F? In C there are three basic types of control structures.

True

52

T or F? A control structure tells the computer what kind of data to use.

False

53

T or F? In C every variable must be declared with a data type.

True

54

T or F? Some data cannot be represented by variables of types int, float, double, or char.

True

55

T or F? In C the main procedure must be the first function in the program.

False

56

The three basic control structures in C are _______, _______, and _______.

sequence, selection, repetition

57

C is a strongly __________ language.

typed

58

The derived data types in C are _______, _______, and ________.

arrays, character strings, structures

59

In C the procedures are called __________.

functions

60

In C there is always a __________ function.

main

61

T or F? Every variable in C must be declared.

True

62

T or F? A variable declared with data type double will be allocated four bytes of storage.

False

63

T or F? Derived data types are derived from basic or built-in data types.

True

64

T or F? A structure data type is a homogeneous data type.

False

65

T or F? An array is a heterogeneous data type.

False

66

T or F? Variables in C can be initialized when they are declared.

True

67

T or F? Named constants in C must be declared just like any other named variables.

True

68

Declare the following variables as integer variables.
iter, counter
i, j, k
max, min, ival, imax, jmax

int iter, counter;
int i, j, k;
int max, min, ival, imax, jmax;

69

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;

70

Declare the following variables as floating-point variables.
balance, energy, power, voltage, current, acidity, phvalue

float balance, energy, power, voltage, current, acidity, phvalue;

71

Declare the following variables as character variables.
code, basic_colors, student_status, depth_code.

char code, basic_colors, student_status, depth_code;

72

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*/

73

In C the built-in data types are ___________, _____________, ____________, and ____________.

int, float, double, char

74

In C the derived data types are _____________, __________, and __________.

array, string, structure

75

T or F? The order of precedence of arithmetic operators is important in the evaluation of a C expression.

True

76

T or F? Parentheses have the lowest order of precedence in evaluating a C expression.

False

77

T or F? The order of evaluation of the arithmetic operators is that division and/or multiplication is performed before addition and/or subtraction.

True

78

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.

False

79

T or F? When an algebraic expression is divided by another algebraic expression you must enclose each of the expressions with parentheses.

True

80

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.

True

81

T or F? C has large collection of library functions.

True