|
|
 |
|
|
|
|
Boldface text in syntax diagrams, 47 |
|
|
|
 |
|
|
|
|
bool.h file, 546, 862 |
|
|
|
 |
|
|
|
|
Boole, George, 188n, 198-199 |
|
|
|
 |
|
|
|
|
Boolean data type, 188-190 |
|
|
|
 |
|
|
|
|
Boolean expressions, 188-196 |
|
|
|
 |
|
|
|
|
Boolean functions, 412-415 |
|
|
|
 |
|
|
|
|
Braces ({ }) |
|
|
|
 |
|
|
|
|
in array initializations, 602 |
|
|
|
 |
|
|
|
|
for blocks, 74, 205-206 |
|
|
|
 |
|
|
|
|
for enumeration types, 536-537 |
|
|
|
 |
|
|
|
|
in functions, 43, 72 |
|
|
|
 |
|
|
|
|
with if statements, 204-205, 208, 212 |
|
|
|
 |
|
|
|
|
positioning, 205-206 |
|
|
|
 |
|
|
|
|
for record (struct) declarations, 774 |
|
|
|
 |
|
|
|
|
for record (struct) initializations, 776 |
|
|
|
 |
|
|
|
|
in syntax templates, 48 |
|
|
|
 |
|
|
|
|
Brackets |
|
|
|
 |
|
|
|
|
for array index values ([]), 595-597, 709, 821-822 |
|
|
|
 |
|
|
|
|
for preprocessor directives (<>), 77, 546 |
|
|
|
 |
|
|
|
|
Branching, 14. |
|
|
|
 |
|
|
|
|
See also Control structures |
|
|
|
 |
|
|
|
|
with do-while, 464-468 |
|
|
|
 |
|
|
|
|
with if. |
|
|
|
 |
|
|
|
|
See if statements |
|
|
|
 |
|
|
|
|
with switch, 460-464 |
|
|
|
 |
|
|
|
|
break statements |
|
|
|
 |
|
|
|
|
with loops, 472-475 |
|
|
|
 |
|
|
|
|
with switch statements, 460-464 |
|
|
|
 |
|
|
|
|
Bugs. |
|
|
|
 |
|
|
|
|
See also Errors |
|
|
|
 |
|
|
|
|
from assignment expressions, 209, 511-512 |
|
|
|
 |
|
|
|
|
encapsulation for preventing, 360-361 |
|
|
|
 |
|
|
|
|
from global variables, 401-404 |
|
|
|
 |
|
|
|
|
with increment and decrement operators, 512-513 |
|
|
|
 |
|
|
|
|
and interface design, 415-416 |
|
|
|
 |
|
|
|
|
from operator associativity, 517 |
|
|
|
 |
|
|
|
|
from reference parameters, 343 |
|
|
|
 |
|
|
|
|
and variable initialization, 400 |
|
|
|
 |
|
|
|
|
Building-block problem-solving approach, 24-25, 28, 164 |
|
|
|
 |
|
|
|
|
Byron, Anna Isabella, 406 |
|
|
|
 |
|
|
|
|
Byron, Lord, 406 |
|
|
|
 |
|
|
|
|
Bytes |
|
|
|
 |
|
|
|
|
in data representation, 8-9 |
|
|
|
 |
|
|
|
|
in data type sizes, 503-504 |
|
|
|
 |
|
|
|
|
CalcPay function (Payroll), 30 |
|
|
|
 |
|
|
|
|
CalculateAndPrint function (CategoryCount), 484-485 |
|
|
|
 |
|
|
|
|
Calculations, 65-68. See also Expressions |
|
|
|
 |
|
|
|
|
Calculators |
|
|
|
 |
|
|
|
|
Difference Engine, 330, 406 |
|
|
|
 |
|
|
|
|
mechanical, 100-101 |
|
|
|
 |
|
|
|
|
Calculus, 101 |
|
|
|
 |
|
|
|
|
Calling functions, 43-44, 100-102, 141, 334-335 |
|
|
|
 |
|
|
|
|
Calls, recursive, 1120 |
|
|
|
 |
|
|
|
|
Campaign list case study, 809-821 |
|
|
|
 |
|
|
|
|
Cancellation errors, 532-533 |
|
|
|
 |
|
|
|
|
Candidate list case study, 809-821 |
|
|
|
 |
|
|
|
|
Candidate votes case study, 728-740 |
|
|
|
 |
|
|
|
|
Capitalization, A36. See also Uppercase letters |
|
|
|
 |
|
|
|
|
of constant identifiers, 61-62, A36 |
|
|
|
 |
|
|
|
|
of enumerators, 537 |
|
|
|
 |
|
|
|
|
Car gas mileage case study, 81-84, 149-151 |
|
|
|
 |
|
|
|
|
Card game simulation, 1090-1109 |
|
|
|
 |
|
|
|
|
CardAt function (CardPile class), 1084, 1086, 1089 |
|
|
|
 |
|
|
|
|
CardDeck class |
|
|
|
 |
|
|
|
|
constructor for, 1094-1095, 1098 |
|
|
|
 |
|
|
|
|
implementation file for, 1097-1101 |
|
|
|
 |
|
|
|
|
specification file for, 1094-1095 |
|
|
|
 |
|
|
|
|
carddeck.cpp file, 1097-1109 |
|
|
|
 |
|
|
|
|
carddeck.h file, 1094-1095 |
|
|
|
 |
|
|
|
|
CardPile class |
|
|
|
 |
|
|
|
|
constructors for, 1085-1087 |
|
|
|
 |
|
|
|
|
destructor for, 1085, 1088-1089 |
|
|
|
 |
|
|
|
|
implementation file for, 1085-1090 |
|
|
|
 |
|
|
|
|
specification file for, 1084-1085 |
|
|
|
 |
|
|
|
|
cardpile.cpp file, 1086-1090 |
|
|
|
 |
|
|
|
|
cardpile.h file, 1084-1085 |
|
|
|
 |
|
|
|
|
Caret (^), 510 |
|
|
|
 |
|
|
|
|
CargoMoment function (Starship), 443 |
|
|
|
 |
|
|
|
|
Carriage return, escape sequence for, 521 |
|
|
|
 |
|
|
|
|
Case labels for switch statements, 460-463 |
|
|
|
 |
|
|
|
|
Case of characters. See also Letters |
|
|
|
 |
|
|
|
|
converting, 524-526, A5 |
|
|
|
 |
|
|
|
|
with identifiers, 51, A36 |
|
|
|
 |
|
|
|
|
Cast operations, 95-99, 509-510, 514 |
|
|
|
 |
|
|
|
|
with enumeration types, 540 |
|
|
|
 |
|
|
|
|
precedence of, 516 |
|
|
|
 |
|
|
|
|
syntax template for, A24 |
|
|
|
 |
|
|
|
|
CategoryCount program, 482-485 |
|
|
|
 |
|
|
|
|
CD-ROM drives, 17 |
|
|
|
 |
|
|
|
|
ceil function, A6 |
|
|
|
 |
|
|
|
|
Center of gravity case study, 433-445 |
|
|
|
 |
|
|
|
|
Central processing unit (CPU), 15-16 |
|
|
|
 |
|
|
|
|
CHAR_BITS constant, A5 |
|
|
|
 |
|
|
|
|
char data type, 53-55, 517-518 |
|
|
|
 |
|
|
|
|
as atomic data type, 502-503 |
|
|
|
 |
|
|
|
|
bytes for, 9 |
|
|
|
 |
|
|
|
|
collating sequences for, 55, 191-192 |
|
|
|
 |
|
|
|
|
comparing, 55, 522-523 |
|
|
|
 |
|
|
|
|
constants, 59-61, 520-521 |
|
|
|
 |
|
|
|
|
converting case of, 524-526 |
|
|
|
 |
|
|
|
|
converting to integers, 523-524 |
|
|
|
 |
|
|
|
|
with input statements, 135-141 |
|
|
|
 |
|
|
|
|
promoting, 549 |
|
|
|
 |
|
|
|
|
range of values for, 504 |
|
|
|
|
|