Index for Chapters 1-5A:

 

Symbols

%c, 49

%d, 49

%f, 49

%lf, 49

& address-of, operator, 51

&& and 148, 149, 154

|| or, logical 148, 149, 154

! not 148, 149, 154

+ addition  59

- subtraction 59

* multiplication  45, 59

/ division 59

% modulas 59, 60

= assignment  46

== equal to 147

!= not equal 147

< less 147

<= less or equal  147

> greater  147

>= greater or equal 147

++ increment 224-226

-- decrement operator  225

\ backslash  121

/* comment, open  36

*/ comment, close  36

\n escape sequence, newline 49, 50

# number, symbol 34

 

A

abs, 109

absolute value, 109

abstraction, 22

abstraction, procedural, 122

accumulator, 216

actual argument, 127, 134

Ada, 17

addition, 59

address, 17, 28

address, memory cell, 6

address-of, operator (&), 51

algorithm, 23, 96

amortization table, 272

ampersand, 51, 53

analysis, 22, 25

and (&&), 148, 149, 154

ANSI, 34

apostrophe, 44

application, 15

argument, actual, 127, 134

argument, correspondence, 132, 133

argument, function, 48

argument, input, 125, 128, 130

argument, output, 125

argument, type of, 108, 134

arithmetic expression, 58

assembly language, 16, 17

assignment, logical, 154

assignment, mixed-type, 62

assignment, statement, 45, 46, 87, 88

associativity, 64

Atanasoff, 2

automobile safety ratings, 163

 

B

backslash (\), 121

ballistics tables, 2

base 2, 28

batch mode, 76, 241

Berry, 2

binary, digit, 7

binary, file, 18, 19

binary, number, 5

binary, operator, 63

bit, 7, 28

blank line, output of, 49

blank line, use for readability, 56

boolean (logical), 148, 150

booting computer, 14

bread machine, 207

breakpoint, 261

buffered read, (scanf), 35, 36, 47, 49, 51, 53, 88

bug, 80

byte, 7, 9, 28

 

C

C language, 17, 34

%c, 49

C++, 17

cable Internet access, 13

call, function, 48, 114, 121, 129, 134, 137

car loan, 140

case, 190, 198

case study, circle area, circumference, 97

case study, coin collection evaluation, 67

case study, collecting area for solar house, 254

case study, drawing diagrams, 112

case study, miles-to-kilometers conversion, 25, 27

case study, water bill, 166

case study, water bill with conservation, 177

case study, weight of flat washers, 100

CD, 5, 6, 8

CD drive, 9

ceil, 109

cell, memory, 6, 28

Celsius, to Fahrenheit, 227-229

centimeters, from inches, 231

central processing unit, 3, 5, 6, 9

channel depth, 276

char, 42, 44, 87

character, 42, 44

character, comparison, 153

character, I/O, 49, 52

chip, computer, 2, 3

chip, microprocessor, 2, 3

close, comment, 36

close, file, 80, 88

coaxial cable, 13

Cobol, 17

code, reuse, 105

cohesive function, 175

command, 14, 29

command, line interface, 14

comment, 36, 56, 57, 96

comment, close (*/), 36

comment, open (/*), 36

compact disk, 5, 6, 8

comparison, character, 153

comparison, nested if and switch, 193

comparison, while and if, 213

compass headings, 204

compiler, 16, 18, 29

compiler, listing, 82

complement, condition, 156

complement, logical, 149

components, computer, 6, 28

compound, assignment operator, 220

compound, statement, 146, 187

compressed-gas cylinder contents, 204

computer, 2

computer, components, 6

computer, mainframe, 3

computer, notebook, 4

computer, palmtop, 4

computer, personal, 3

computer, workstation, 4

condition, 147, 197

condition, complementing, 156

condition, loop repetition, 213-215

constant, 36, 37, 87

constant, macro, 36, 37, 87

constant, macro, advantages, 175

constant, name of, 40

constant, numeric, 42, 43

contents, memory cell, 6

control, structure, 146

control, structure, repetition, 210

control structure, selection, 146, 158, 197

control, structure, sequential, 146

control, transfer to function, 121

controlling expression, 190

conversion, Celsius-to-Fahrenheit, 227-229

conversion, compass heading to compass bearing, 204

conversion, data type, 62, 63

conversion, distance, 78

conversion, Fahrenheit to Celsius, 91

conversion, inches to cm, 231

conversion, miles to kilometers, 25, 27, 79

copy, 47

correspondence, argument, 132, 133, 134

counting loop, 211, 212, 266-268

counting loop, negative step, 268

CPU, 3, 9, 28

cursor, 10, 11, 49, 50

cyclist deceleration, 143

cylinder production cost, 143

 

D

%d, 49

dam design, 90

data, computer, 28

data, file, 9

data, input, 20

data, retrieval, 7

data, storage, 7

data, type, 42, 43, 44, 87

data, type, expression, 61

database, management, 15

day number, 205

debug, 80

decimal places, 74

decimal point, move, 131

decision step, 166

decision table, 183

declaration, 37

declaration, local, 117, 130, 134

declaration, variable, 41, 42, 55, 87

decrement operator (--), 225

#define, 34, 37, 87

definition, function, 138

DeMorgan's Theorem, 156

design, 23, 25

design, top-down, 23

desk check, 23, 164

device, input, 5, 6, 10

device, output, 5, 6, 10

device, storage, 5, 6, 8

diagnostic calls to printf, 261

digital subscriber line, 13

digital video disk, 9

digits of number, 275

directive, preprocessor, 34, 36, 55, 87

directory, 9

directory display, 15

disk, 8

disk, compact, 5, 6, 8

disk, floppy, 5, 6

disk, hard, 5, 6

disk, zip, 5, 6, 8

display, table, 227

distance between points, 112

distance conversion, 78

division, 59

division, varying results in, 59

divisor, greatest common, 273

do, 250-253, 267, 269

documentation, program, 56, 96, 131, 136

double, 38, 42, 43, 87

double, format, 74, 75

double, output, 74, 75

do-while, 250-253, 267, 269

draft eligibility, 186

drive, CD, 9

driver, 132, 135

DSL, 13

DVD, 5, 6, 8

DVD drive, 9

 

E

e (in scientific notation), 43

earthquake characterization, 204

echo print, 76

Edison, 24

editor, 29

else, 158-161

else, associated with most recent if, 187

empty, data set, 241

endfile-controlled loop, 242

endfile-controlled loop, pseudocode, 242, 267

environment, integrated development, 19

equal to, (==), 147

error, == mistyped as =, 265

error, argument-parameter mismatch, 136

error, break omission in switch, 191-193, 197

error, careless input of character, numeric data, 83

error, comment inside another comment, 57

error, double variable as counter, 224

error, do-while that may execute zero times, 266

error, else is unexpected symbol, 196, 197

error, faulty data causes infinite loop, 244, 253

error, improper else, 264

error, incorrect results, 83

error, inequality test for loop repetition, 264

error, logic, 86

error, message, 80

error, misplaced blanks, 56

error, missing braces in if with compound tasks, 264

error, missing braces on multiple-statement loop body, 264

error, missing semicolon, 81

error, necessary #include omitted, 136

error, no parentheses around if condition, 196

error, non-variable operand of increment, decrement, 266

error, off-by-one loop repetition, 262

error, omission of brace ending switch, 192

error, omitted * in multiplication, 66

error, poorly designed sentinel loop, 240

error, quotation marks misused, 83

error, run-time, 83, 84

error, semicolon after for-loop header, 264

error, semicolon after if condition, 160

error, space in close-comment sequence, 81

error, syntax, 81

error, undeclared variable, 81

error, undetected, 83

error, using = in place of ==, 196

escape sequence, newline (\n), 49, 50

evaluation, expression, 63-66, 151

evaluation, short-circuit, 152

evaluation, tree, 64-66

even number, 155

ex, 109

executable file, 18, 19, 29

executable statement, 37, 45, 87

execute instruction, 10

execution, program, 5, 19, 20, 28, 38, 45, 121

execution, single-step, 261

exit, loop, 213

exp, 109

exponentiation, 109

expression, arithmetic, 58

expression, data type of, 61

expression, evaluation, 151

expression, evaluation, rules, 63

expression, logical, 148, 154

expression, mixed-type, 61

 

F

%f, 49

fabs, 109

factorial, 226

Fahrenheit, from Celsius, 227-229

failure, 24

fclose, 80,88

fetch instruction, 10, 28

field width, 73, 74

field width, too small, 73

FILE, 78

file, 9, 28

file, binary 18, 19

file, close, 80, 88

file, data, 9

file, executable, 18, 19, 29

file, header, 34, 35, 36

file, input, 76, 78, 88, 234

file, object, 18, 19

file, open, 78, 88

file, output, 9, 76, 78, 88

file, pointer, 78, 87

file, program-controlled, 78, 87, 88

file, server, 11

file, source, 17, 18, 119

file, text, 17, 18

final exam score needed, 92

flag, 251

floor, 109

floppy disk, 5, 6

flowchart, 158, 159, 187, 189, 214

fopen, 78, 88

form, source file, 55, 119

form, program, 119

formal parameter, 127, 130, 134

format, int, 73

fomat, double, 74, 75

format string, 48, 53

formulas, writing, 66

Fortran, 17

fprintf, 78, 80, 88

fractions, product of, 92

freezer temperature, 91

fruit flies population, 162

fscanf, 78, 80, 88

fscanf, result value, 242

function 19

function, advantages, 122

function, argument, 48, 107

function, as a black box, 106

function, call, 48, 87, 114, 121, 129, 137

function, cohesive, 175

function, computation, 137, 138

function, data area, 134, 135

function, definition, 116, 117, 130

function, driver, 132, 135

function, for loop processing, 237

function, heading, 118, 130

function, input, 47, 88

function, instructions, 123

function, key, 11

function, library, 108

function, main, 37, 38, 55, 87

function, memory for, 134, 135

function, output, 48, 88

function, predefined, 105

function, prototype, 115, 116, 137

function, single-result, 127, 128, 130, 137, 138

function, trigonometric, 109

function, void, 116, 126

function, with input arguments, 125, 128, 130

function, with multiple arguments, 131

function, with output arguments, 125

function, without arguments, 114, 137, 138

function, without parameters, 137

function, without results, 137

 

G

gas pressure, volume, temperature, 275, 276

gasoline storage tank, 232-236

gearbox speeds ratio, 143

gigabyte, 9

graph, sine wave, 278

graphical user interface, 11, 14, 15

grass cut time, 92

greater (>), 147

greater or equal (>=), 147

greatest common divisor, 273

GUI, 11, 14, 15

 

H

.h files 34, 35

hand trace, 164

hard copy, 11

hard disk, 5, 6

hardware, 3

header file, 34, 35, 36

heading, function, 118, 130

heat from furnace, 92

high-level language, 16, 17

house cost, 142

 

I

icon, 11

IDE, 19, 29

identifier, 38

identifier, naming rules, 39, 87

identifier, standard, 38

if, multiplier-alternative, 180, 197, 198

if, statement, 158-161

if, statement nested, 179, 198

if, statement nested vs. sequence, 180

implementation, 23, 25

implementation, multiple-function program, 170

import (include), 34, 35, 36, 87

#include, 34, 35, 36, 87

indentation, 56

indentation, if statement 161

indentation, for loop, 224

infinite loop, 215

information flow, 132

initialization, loop control variable, 214, 222

input, 47, 48, 88

input, argument, 125, 128, 130

input, data, 20

input, device, 5, 6, 10

input, file, 76, 78

input, files, multiple, 255

input, list, 53

input, skipping spaces on, 53

input, subproblem, 176

input/output, character, 49, 52

input/output, numeric, 49, 51

input/output redirection, 76, 77

install, 16

instructions, display, 123

int, 38, 42, 43, 87

integer, 42, 43

integer, division, avoiding, 62, 63

integer, format, 73

integer, output, 73

integrated development environment, 19, 29

interactive mode, 76

interface, command-line, 14

interface, graphical user, 11, 14, 15

Internet, 11, 28

Internet access, cable, 13

invalid data input, 242

 

J

Java, 17

jet fighter acceleration, 93

 

K

kernel, 194

keyboard, 3, 5, 6, 10

kilobyte, 9

 

L

LAN, 11, 12, 28

language, assembly, 16, 17

language, high-level, 16, 17

language, machine, 16, 17

language, programming, 2

left associativity, 64

length, identifier, 39

less (<), 147

%lf, 49

library, 34, 35

library, standard, 34, 35

light bulb brightness, 195

light bulb life, 192

line, numbers program, 34

linker, 18, 19, 29

Lisp, 17

listing, compiler, 82

ln, 109

load module, 18

loader, 18, 19, 29

loan, amortization table, 272

loan, car, 140

local area network, 11, 12

local declaration, 117, 130, 134

local variable, 118, 130, 134

log, 109

log10, 109

logarithm, 109

logic error, 86, 198

logical complement, 149

logical expression, 148, 154

loop, 210

loop, body, 210

loop, boundaries, 263

loop, control variable, 212, 214, 222

loop, counter-controlled, 212, 266-268

loop, counting, 211, 212, 266-268

loop, counting, with negative step, 268

loop, design questions, 239

loop, do-while, 250-253, 267, 269

loop, endfile-controlled, 211, 242

loop, exit, 213

loop, for, 222, 267, 268

loop, general conditional, 211, 267

loop, infinite, 215

loop, input validation, 211, 267

loop, kinds, 211

loop, one-trip, 250

loop, repetition condition, 213, 215

loop, sentinel-controlled, 211, 238, 240-243, 266-268

loop, while, 212-215, 267, 268

loop, zero-trip, 250

loop, nested, 245-249

lumber, engineering properties, 277

 

M

machine language, 16, 17

Macintosh OS, 14

macro, constant, 36, 37, 87

main, function, 37, 38, 55, 87

main memory, 5, 6

mainframe, 3

maintenance, 24, 40, 175

math.h, 36

media, storage, 8

megabyte, 9

memory, 5, 17, 28

memory, allocation, 122, 134

memory, cell, 6, 28

memory, main, 5, 6

memory, random access, 8

memory, read-only, 8, 14

memory, secondary, 5

method, software development, 21, 25

microprocessor, 2, 3

microwave tower, 12

mileage reimbursement, 90

miles to kilometers, 25, 27, 79

mixed-type assignment, 62

mixed-type expression, 61

modem, 13

modular programming, 137

modulas (%), 59-60

monitor, 3, 5, 6, 10

mouse, 3, 5, 6, 11

MS-DOS, 14

multiple-alternative if, 180-185, 197, 198

multiplication, 45, 59

multiply, list of numbers, 219

music teacher's discount, 203

 

N

\n, 49, 50

names valid identifier, 39

natural logarithm, 109

negation, 149

negative step counting loop, 268

nested if, 179, 198

nested if, comparison to switch, 193

nested loops, 245-249

network, local area, 11, 12

network, wide area, 11, 12

newline (\n), 49, 50

noise loudness, 182

not (!), 148, 149, 154

not equal (!=), 147

notation, scientific, 43

notebook, 4

number, floating point, 49

number, symbol (#), 34

numeric I/O, 49, 51

 

O

object, file, 18, 19

object, program, 29

off-by-one error, 262

open, comment, (/*), 36

open, file, 78, 88

operand, 58

operating system, 13, 29

operation, input, 47, 48

operation, output, 48, 88

operator, %, 59-60

operator, &, 51

operator, addition (+), 59

operator, address-of (&), 51

operator, and (&&), 148, 149, 154

operator, assignment (=), 46

operator, binary, 63

operator, compound assignment, 220

operator, decrement (--), 225

operator, division (/), 59

operator, equal (==), 147

operator, greater (>), 147

operator, greater or equal (>=), 147

operator, increment, (++), 224-226

operator, less (<), 147

operator, less or equal (<=), 147

operator, modulas (%), 59, 60

operator, multiplication (*), 45, 59

operator, not (!), 148, 149, 154

operator, not equal (!=), 147

operator, or (||), 148, 149, 154

operator, precedence, 64, 150

operator, quotient (/), 59, 60

operator, relational, 147

operator, remainder, (%), 59, 60

operator, subtraction, (-), 59

operator, unary, 150

or, logical ( || ), 148, 149, 154

OS, 13

OS/2 Warp, 14

output, 48, 88

output, argument, 125

output, device, 5, 6, 10

output, file, 9, 76, 78

output, integer, 73

output, program, 20

output, real number, 74, 75

output, subproblem, 176

 

P

palmtop computer, 4

parameter, formal, 127, 130, 134

parameter, type of, 134

parentheses, 63, 151

parse (scanf, sscanf), 35, 36, 47, 49, 51, 53, 88

percent operator, 59-60

percent sign, 204

personal computer, 3

pH, 189

placeholder, 48, 49, 51

point, Cartesian plane, 205

pointer, file, 78, 87

population increase, 237

postcondition, 131

postfix increment, 255

power company bills, 206

precedence, operator, 64, 150

precondition, 131

preprocessor, 34

preprocessor directive, 34, 36, 55, 87

print list, 48

printer, 5, 6, 11

printf, 35, 36, 48-49, 88

printf, diagnostic calls, 261

printing numbers, 49

problem statement, 25

problem-solving questions, 210

procedural abstraction, 122

processing unit, central, 3, 5, 6, 9

product accumulating, 219

program, 2, 5

program, execution, 5, 19, 20, 28, 38, 45

program, form, 55, 119

program object, 29

program, output, 20

program, source, 29

programming language, 2

projectile flight, 141

Prolog, 17

prompt, 14, 51

prototype, function, 115, 116, 137

pseudocode, 169

pseudocode, general conditional loop, 220, 267

pseudocode, endfile-controlled loop, 242, 267

pseudocode, sentinel-controlled loop, 238, 267

pseudocode, counting loop, 267

punctuation, 37

Pythagorean triples, 92

 

Q

quadratic equation roots, 110

questions, loop design, 239

quotation marks, misused, 83

quote, single, 4

quotient, 59, 60

 

R

RAM, 8

random access memory, 8

range specification, 152

readability, 175

read-only memory, 8, 14

readLine, (scanf), 35, 36, 47, 49, 51, 53, 88

real number, 42, 43

real number, output, 74, 75

real-time system, 3

refinement, algorithm, 23

remainder, 59, 60

repetition, 210

requirements, 21

reserved word, 38, 87

results, 20

retrieve value, 7

return, 38, 53-54, 88, 121

return result, 125, 130

reuse, 122

reuse, code, 105, 137

right associativity, 64

right justification, 73

Richie, Dennis, 34

ROM, 8, 14

rounding, 62, 63, 142

run-time error, 83

runner's speed, 142

 

S

satellite relay, 12

scale a number, 131

scanf, 35, 36, 47, 49, 51, 53, 88

scanf, result value, 242

scanf, with invalid data, 242

scanner, 5, 6

scientific notation, 43

scope, 134

secondary storage, 5, 6, 8, 28

selection, 146, 158, 197

sentinel, value, 238

sentinel-controlled loop, 211, 238, 240-242

sentinel-controlled loop, pseudocode, 238, 267

sequence, 146

server, file, 11

shell script, 194

ship classification, 190

short-circuit evaluation, 152

side effect, 224

side effect, unpredictable, 226

sin, 109

sine, 109

sine wave graph, 278

single quote, 44

skip remainder of line, 251, 252

skipping spaces on input, 53

slash-star, 57

Smalltalk, 17

software, 5

software development method, 21, 25, 29, 96, 136

sound, speed in air, 143

source file, 17, 18, 119

source file form, 55

source program, 29

space, use for readability, 56

speaker, 5, 6

speed, average needed, 136

spreadsheet, 15

sqrt, 106, 109

standard deviation, 273

standard identifier, 38

standard library, 34, 35

star-slash, 57

statement, assignment, 45, 46, 87, 88

statement, break, 191

statement, compound, 146, 197

statement, do-while, 250-253, 267, 269

statement, executable, 37, 45, 87

statement, extending over two lines, 56

statement, for, 222, 267

statement, if, 158-161

statement, nested if, 179, 198

statement, return, 53, 54, 88

statement, switch, 190, 198, 199

statement, while, 212-215, 267, 268

status, input, 242

stdio.h, 35, 48

storage, device, 5, 6

storage, media, 8

storage, secondary, 5, 6, 8, 28

store value, 7

stored program concept, 6

string, format, 48

structure, chart, data flow in, 167, 168, 176, 197

style, 29

style, constant macro names, 40

style, constant macros for readability, 175

style, eliminating leading blanks, 74

style, for statement format, 223

style, identifier names, 40

style, if statement format, 161, 163

style, names use in functions, 174

style, program, 40

style, use of comments, 57

style, use of spaces, indentation, 56

style, validating variable values, 185

subdirectory, 9

subprogram advantages, 122

subtraction, 59

sum, accumulating, 42, 216

supercomputer, 3

switch, 190, 198, 199

switch, comparison to nested if, 193

syntax error, 81

syntax errors, listing with, 82

systems programming, 34

 

T

table, display, 227

tan, 109

tax table, 184

telephone line, 13

temperature at depth, 143

terabyte, 9

testing, 23, 25

testing, loop repetition, 214, 222

text file, 17, 18

toilet, low-flush, 92

top-down design, 23

touch pad, 5

trace, 218

trace, hand, 164, 198

trace, if statement, 165

trace, loop, 229

trace, program, 261

transaction processing, 3

transcript message, 189

triangle sides, 110

trigonometric functions, 109

true, 150

type, argument/parameter, 134

type, cast, 62

type, conversion, 62, 63

type, conversion, argument, 108

type, data, 42, 43, 44, 87

type, expression, 61

 

U

unary operator, 150

underscore, 39, 87

undetected error, 83

UNIX, 14, 34, 194

update, loop control variable, 214

user, 5

 

V

vacuum tubes, 2

variable, 41

variable, declaration, 41, 42, 55, 87

variable, local, 118, 130, 134

velocity, particle, 65

VMS, 14

void, 38, 130, 137

void, function, 116, 126, 138, 282

 

W

WAN, 11, 12, 28

while, 212-215, 267, 268

wide area network, 11, 12

wind speed categories, 190

Windows, 14

word processor, 15, 18

workstation, 4

World Wide Web, 11

WWW, 11

 

X

X Windows System, 14

 

Z

zip disk, 5, 6, 8