A B C D E F G H I J-K L M N O P Q-R S T U V W-Z

Numbers

[top]

4 × 5 matrices, 113-114

Symbols

[top]

# preprocessor directive, 470

## operator, 310-311

#define preprocessor directive, 465-467

#define statement

## operator, 310-311

preprocessor, 297-311

program extendibility, 301-302

program portability, 302-303

#elif preprocessor statement, 316-317

#else preprocessor statement, 315

#endif preprocessor statement, 316

#error preprocessor directive, 467

#if preprocessor directive, 467-468

#if preprocessor statement, 316-317

#ifdef preprocessor directive, 468

#ifdef preprocessor statement, 314-316

#ifndef preprocessor directive, 468

#ifndef preprocessor statement, 314-316

#include preprocessor directive, 468-469

#include preprocessor statement, 311-314

#line preprocessor directive, 469

#pragma preprocessor directive, 469

#undef preprocessor directive, 469-470

#undef preprocessor statement, 317

A

[top]

absolute values, integers, calculating, 66, 128-130

absoluteValue() function, 128-134

addEntry() function, 388

Albahari, Joseph and Ben, 508

algorithms, 5

aligning output, 50-51

alphabetic() function, 210

AND bitwise operator, 279-281

ANSI.org, 506

ar command (Unix), 343-344

arguments

command-line, 380-384

functions, 123-124

checking, 133-137

declaring type, 133-135

arithmetic, integer, 33-39

arithmetic expressions, 21, 30-39

arithmetic operators, 31, 446-447

arrays, 95-96

base conversions, 109-111

basic operations, 451

character, 108-113, 194-196

character strings, 218-226

defining, 96-106

finding minimum value in, 138-141

functions, 137-151

changing elements in, 141-143

generating Fibonacci numbers, 103-104

illustrating, 186-187

initializing, 106-108

multidimensional, 113-115, 436-437

multidirectional, 146-151

pointers, 258-270, 453-454

prime numbers, generating, 104-106

setting, gdb (GNU Debugger), 407-408

single-dimensional, 435

sorting, 143

structures, 180-181, 185-186

using elements as counters, 100-103

variable-length, 115-117, 436

arraySum() function, 262-264

ascending order, arrays, sorting into, 144-145

assembly language program, 9

assignment operators, 39, 449

changing array elements in functions, 141-143

atoi() function, 393

auto variable, 456

automatic local variables, 124-126, 155-158

B

[top]

base conversions, arrays, 109-111

BASIC programming language, 10

bits, 277-278

fields, 291-295

operators, 278-291

Exclusive-OR, 282-283

left shift, 285-288

ones complement, 283-285

right shift, 286-288

rotating, 288-291

bitwise operators, 448

AND, 279-281

Inclusive-OR, 281-282

_Bool data type, 21, 24-28, 433

Boolean variables, 86-90

break statement, 62, 460

breakpoints, listing and deleting, gdb (GNU Debugger), 406

Budd, Timothy, 507

building programs, 9

bytes, 277-278

C

[top]

C: A Reference Manual, 505

C Programming Language, The, 505

C# 5.0 in a Nutshell: The Definitive Reference, 508

C++ Primer Plus, 507

C++ Programming Language, The, 507

calculateTriangularNumber() function, 124-125

calculating

absolute values, integers, 66, 128-130

square roots, 130-133

calling functions, 121-122, 130-137, 459

gdb (GNU Debugger), 407-408

cc command, 7, 12

char *fgets (buffer, i, filePtr) function, 478

char *getenv (s) function, 493

char *gets (buffer) function, 480

char *strcat (s1, s2) function, 474

char *strchr (s, c) function, 474

char *strcoll (s1, s2) function, 474

char *strcpy (s1, s2) function, 474

char *strerror (n) function, 474

char *strncat (s1, s2, n) function, 474

char *strncpy (s1, s2, n) function, 475

char *strpbrk (s1, s2) function, 475

char *strrchr (s, c) function, 475

char *strstr (s1, s2) function, 475

char *strtok (s1, s2) function, 475

char data type, 21, 28, 433

char variable, 24

character arrays, 108-113

character constants, 430-431

character functions, 476-477

character I/O (input/output), 346

character strings, 16, 193-194

arrays, 194-196, 218-226

character operations, 226-229

concatenating, 200-201

concatenation, 431-432

constants, 431-432

pointers, 266-267

strings, 217-218

counting characters in, 198-199

displaying, 199-202

escape characters, 215-217

initializing, 199-202

inputting, 204-206

null string, 211-214

pointers, 264-266

reading, 205

single-character input, 206-211

structures, 218-226

testing for equality, 202-204

variable-length, 197-214

characters, diagraphs, 427

classes, storage, 456

closing files, fclose() function, 365-367

code. See also programs

Code::Blocks IDE, 507

CodeWarrior, 507

comma operator, 378, 451

command-line arguments, 380-384

commands

cc, 7, 12

gcc, 495, 7, 506

command-line options, 496-497

compiling programs, 495-497

general format, 495

gdb (GNU Debugger), 410-411

Unix, 343-344

comments, 17-19, 429

compilers, 6

gcc command, 495-497

errors, 8-9

common mistakes, programming, 499-503

communication, between modules, 334-340

compilers, 6-7, 506-507

compiling

debug code, 393-394

multiple source files from command line, 332-334

programs, 7-10, 11-12

conditional compilation, 314-317

gcc command, 495-497

_Complex data type, 40

compound literals, 454-455

initializing structures, 178-179

compound relational tests, if statements, 72-74

compound statements, 460

computers

instruction set, 5

operating systems, 6-7

concat() function, 197-201

concatenating character strings, 197-201, 431-432

conditional compilation, preprocessor, 314-317

conditional operators, 90-92, 449-450

const keyword, 442

pointers, 251-252

const variable, 111-113

constant expressions, 445-446

constants, 21-28

character, 217-218, 430-431

character string, 431-432

pointers, 266-267

defined names, #define statement, 297-311

enumeration, 432

floating-point, 430

integer, 22, 429-430

wide character, 431

continue statement, 62-63, 460

conversion characters

printf() function, 348

scanf() function, 353

conversion modifiers, scanf() function, 353

conversions

data type, 319, 325-328

floating-point, 36-38

integer-point, 36-38

convertNumber() function, 152-154

copying files, 365-366

copyString() function, 264-266, 269-270

counters, arrays, using elements as, 100-103

countWords() function, 210-211

Cox, Brad, 417

cvs utility, 343

CygWin, 506

D

[top]

data, formatting

printf() function, 346-353

scanf() function, 353-358

data types, 21-28, 433-434

_Bool, 24-26, 433

char, 24, 433

_Complex, 40

conversions, 319, 325-328, 455-456

derived, 435-440

double, 23, 433

double_Complex, 433

enumerated, 319, 441

extending data types, 319-323

extending, 319

data type conversions, 325-328

enumerated data types, 322

typedef statement, 323-325

float, 23, 433

float_Complex, 433

_Imaginary, 40

int, 433

long double, 433

long double_Complex, 433

long int, 433

short int, 433

specifiers, 26-28

type definitions, 319

unsigned char, 433

unsigned int, 433

void, 433

dates, storing, structures, 164-169

debug code, compiling in, 393-394

DEBUG macro, 395-396

debugging programs, 391

gdb (GNU Debugger), 397-411

preprocessor, 391-397

declarations, 432-435

function calls, 459

variables, for loops, 56

decrement operators, 267-270, 448-449

defined names, constants, #define statement, 297-311

defining

arrays, 96-106

functions, 119-122, 458

header files, 471-473

pointer variables, 234-237

derived data types, 435-440

multidimensional arrays, 436-437

pointers, 440

single-dimensional arrays, 435

structures, 437-439

unions, 439-440

variable-length arrays, 436

diagraphs, 427

directives, preprocessor, 465-470

#error, 467

#if, 467-468

#ifdef, 468

#ifndef, 468

#include, 468-469

#line, 469

#pragma, 469

#undef, 469-470

displayConvertedNumber() function, 152

displaying

character strings, 199-202

variable values, 15-17

do statement, 60-63, 461

double acos (x) function, 486

double acosh (x) function, 487

double asin (x) function, 487

double asinh (x) function, 487

double atan (x) function, 487

double atan2 (y, x) function, 487

double atanh (x) function, 487

double atof (s) function, 483

double carg (z) function, 491

double ceil (x) function, 487

double cimag (z) function, 492

double complex cabs (z) function, 491

double complex cacos (z) function, 491

double complex cacosh (z) function, 491

double complex casin (z) function, 491

double complex casinh (z) function, 491

double complex catan (z) function, 491

double complex catanh (z) function, 492

double complex ccos (z) function, 492

double complex ccosh (z) function, 492

double complex cexp (z) function, 492

double complex clog (z) function, 492

double complex conj (z) function, 492

double complex cpow (y, z) function, 492

double complex cproj (z) function, 492

double complex creal (z) function, 492

double complex csin (z) function, 492

double complex csinh (z) function, 492

double complex csqrt (z) function, 492

double complex ctan (z) function, 492

double complex ctanh (z) function, 492

double copysign (x, y) function, 487

double cos (r) function, 487

double cosh (x) function, 487

double data type, 21-24, 28, 433

double erf (x) function, 487

double erfc (x) function, 487

double exp (x) function, 487

double expm1 (x) function, 487

double fabs (x) function, 488

double fdim (x, y) function, 488

double floor (x) function, 488

double fma (x, y, z) function, 488

double fmax (x, y) function, 488

double fmin (x, y) function, 488

double fmod (x, y) function, 488

double frexp (x, exp) function, 488

double ldexp (x, n) function, 488

double lgamma (x) function, 488

double log (x) function, 488

double log1p (x) function, 489

double log2 (x) function, 489

double log10 (x) function, 489

double logb (x) function, 489

double modf (x, ipart) function, 489

double nan (s) function, 490

double nearbyint (x) function, 490

double nextafter (x, y) function, 490

double nexttoward (x, ly) function, 490

double pow (x, y) function, 490

double remainder (x, y) function, 490

double remquo (x, y, quo) function, 490

double rint (x) function, 490

double round (x) function, 490

double scalbln (x, n) function, 490

double scalbn (x, n) function, 490

double sin (r) function, 490

double sinh (x) function, 490

double sqrt (x) function, 490

double strtod (s, end) function, 483-484

double tan (r) function, 490

double tanh (x) function, 490

double tgamma (x) function, 490

double trunc (x) function, 490

double_Complex data type, 433

dynamic memory allocation, 384-389

free() function, 387-389

dynamic memory allocation functions, 484-485

E

[top]

else-if statement, 76-83

enumerated data types, 319, 441

extending data types, 319-323

enumeration constants, 432

equality, character strings, testing for, 202-204

equalStrings() function, 202-204, 219

errors, code, 8-9

escape characters, character strings, 215-217

exchange() function, 254-255

Exclusive-OR operator, 282-283

executing, programs, 9-10

exit() function, 369-370

expressions, 442

arithmetic, 21, 30-39

arrays, basic operations, 451

compound literals, 454-455

constant, 445-446

data types, conversion of, 455-456

for loops, multiple, 55

operators, 443-445

arithmetic, 446-447

assignment, 449

bitwise, 448

comma, 451

conditional, 449-450

decrement, 448-449

increment, 448-449

logical, 447

relational, 447-448

sizeof, 450-451

type cast, 450

pointers, 237-238

basic operations, 452-454

structures

basic operations, 452

using in, 166-169

extendibility, programs, #define statement, 301-302

extending data types, 319

data type conversions, 325-328

enumerated data types, 319-323

external variables, 334-337, 456

versus static, 337-339

F

[top]

factorial() function, 158-159

factorials, calculating recursively, 158-159

fclose() function, 365-367

fgets() function, 367-368

Fibonacci numbers, generating, 103-104

fields

bits, 291-295

for loops, omitting, 55

FILE *fopen (fileName, accessMode) function, 478

FILE *freopen (fileName, accessMode, filePtr) function, 479

FILE *tmpfile (void) function, 482

FILE pointers, I/O (input/output), 368-369

files

closing, fclose() function, 365-367

copying, 365-366

header, 471-473

using effectively, 339-340

Makefile, 341-342

naming, 7

opening, 362-364

programs, dividing into multiple, 331-334

reading and writing entire lines of data from and to, 367-368

reading single character from, 364

redirecting I/O (input/output) to, 358-362

removing, 370-371

renaming, 370

specifying lists and dependencies, 341-342

system include, 313-314

findEntry() function, 257

flags, printf(), 347

float data type, 21-23, 28, 433

float strtof (s, end) function, 484

float_Complex data type, 433

floating-point constants, 430

floating-point conversions, 36-38

fopen() function, 362-364

for loops

nested, 53-55

variants, 55-56

for statement, 44-51, 461

formatted I/O (input/output), 346-358

printf() function, 346-353

formatting data

printf() function, 346-353

scanf() function, 353-358

FORTRAN (FORmula TRANslation) language, 6

fprintf() function, 367, 392, 482

fputs() function, 367-368

free() function, 387-389

fscanf() function, 367, 482

functions, 119

absoluteValue(), 128-134

addEntry(), 388

alphabetic(), 210

arguments, 123-124

checking, 133-137

declaring type, 133-135

arrays, 137-151

changing elements in, 141-143

multidirectional, 146-151

arraySum(), 262-264

atoi(), 393

automatic local variables, 124-126

calculateTriangularNumber(), 124-125

calling, 121-122, 130-137, 459

gdb (GNU Debugger), 407-408

character, 476-477

concat(), 197-201

convertNumber(), 152-154

copyString(), 264-266, 269-270

countWords(), 210-211

defining, 119-122, 458

displayConvertedNumber(), 152

dynamic memory allocation, 484-485

equalStrings(), 202-204, 219

exchange(), 254-255

exit(), 369-370

external versus static, 337-339

factorial(), 158-160

fclose(), 365-367

fgets(), 367-368

findEntry(), 257

fopen(), 362-364

fprintf(), 367, 392, 482

fputs(), 367-368

free(), 387-389

fscanf(), 367, 482

gcd(), 125-128

general utility, 492-494

getc(), 364

getchar(), 207-208, 346, 362

getNumberAndBase(), 151

global variables, 151-155

I/O (input/output), 477-482

isLeapYear(), 172

lookup(), 221-226

main(), 13, 119-120, 126

math, 485-492

memory, 475-476

in-memory format conversion, 482-483

minimum(), 138-141

numberOfDays(), 169-172

perror(), 371

pointers, 252-258, 272-273, 460

print_list(), 252

printf(), 13-17, 31-32, 119, 123, 137, 269, 345, 358

formatting data, 346-353

printMessage(), 120-121

process(), 393-394

prototype declaration, 124

putc(), 364

putchar(), 346

readLine(), 208-210

recursive, 158-160

remove(), 370-371

return types, declaring, 133-135

returning results, 126-130

rotate(), 288-291, 314-315

scanf(), 59, 119, 177, 204-206, 358, 392

formatting data, 353-358

shift, 286-288

sort(), 143

sprintf(), 482-483

squareRoot(), 131-134, 137, 155-156

sscanf(), 482-483

static versus external, 337-339

storage classes, 456

string, 474-475

stringLength(), 198, 217

string-to-number, 483-484

structures, 169-177

test(), 254

top-down programming, 137

variables

automatic, 155-158

static, 155-158

writing, 120

G

[top]

gcc command, 7, 495, 506

command-line options, 496-497

compiling programs, 495-497

general format, 495

gcd() function, 125-128

gdb (GNU Debugger)

calling functions, 407-408

commands, 410-411

help, 408-409

controlling program execution, 402-406

debugging programs, 397-411

working with variables, 400-401

listing and deleting breakpoints, 406

obtaining stack trace, 406-407

setting arrays and structures, 407-408

source file display, 401

general utility functions, 492-494

generating

Fibonacci numbers, arrays, 103-104

prime numbers, arrays, 104-106

getc() function, 364

getchar() function, 207-208, 346, 362

getNumberAndBase() function, 151

global variables, functions, 151-155

goto statement, 373-374, 461

grep command (Unix), 343-344

H

[top]

Harbison, Samuel P. III, 505

header files, 471-473

using effectively, 339-340

help command (GDB), 408-409

I

[top]

identifiers, 428

predefined, 470

IDEs (Integrated Development Environments), 10, 506-507

if ( freopen ("inputData," "r", stdin) == NULL ) function, 479

if statements, 65-83, 461-462

compound relational tests, 72-74

else-if, 76-83

if-else, 69-72

nested, 74-76

if-else statement, 69-72

illustrating

arrays and structures, 186-187

pointers, 235

structures, 165

_Imaginary data type, 40

increment operators, 267-270, 448-449

indirection, pointers, 233-234

initializing

arrays, 106-108

character strings, 199-202

structures, 178-179

in-memory format conversion functions, 482-483

input, program, 51-56

inputting character strings, 204-206

instances, OOP (object-oriented programming), 414-416

instruction set, computers, 5

int abs (n) function, 493

int atoi (s) function, 483

int atol (s) function, 483

int atoll (s) function, 483

int data type, 28, 433

int fclose (filePtr) function, 478

int ferror (filePtr) function, 478

int fflush (filePtr) function, 478

int fgetc (filePtr) function, 478

int fgetpos (filePtr, fpos) function, 478

int fpclassify (x) function, 485

int fprintf (filePtr, format, arg1, arg2, argn) function, 479

int fputc (c, filePtr) function, 479

int fputs (buffer, filePtr) function, 479

int fscanf (filePtr, format, arg1, arg2, argn) function, 480

int fseek (filePtr, offset, mode) function, 480

int fsetpos (filePtr, fpos) function, 480

int getc (filePtr) function, 480

int getchar (void) function, 480

int hypot (x, y) function, 488

int ilogb (x) function, 488

int isfin (x) function, 486

int isgreater (x, y) function, 486

int isgreaterequal (x, y) function, 486

int isinf (x) function, 486

int islessequal (x, y) function, 486

int islessgreater (x, y) function, 486

int isnan (x) function, 486

int isnormal (x) function, 486

int isunordered (x, y) function, 486

int printf (format, arg1, arg2, argn) function, 481

int putc (c, filePtr) function, 481

int putchar(c) function, 481

int puts (buffer) function, 481

int remove (fileName) function, 481

int rename (fileName1, fileName2) function, 481

int scanf (format, arg1, arg2, argn) function, 482

int signbit (x) function, 486

int strcmp (s1, s2) function, 474

int strncmp (s1, s2, n) function, 475

int system (s) function, 494

int tolower(c) function, 477

int toupper(c) function, 477

int ungetc (c, filePtr) function, 482

integer arithmetic, 33-39

integer constants, 22, 429-430

integer-point conversions, 36-38

integers

absolute values, calculating, 128-130

if statements, 66

base conversions, 109-111

Integrated Development Environments (IDEs), 10, 506-507

interpreters, 10

Introduction to Object-Oriented Programming, The, 507

I/O (input/output), 345

character, 346

exit() function, 369-370

fclose() function, 365-367

fgets() function, 367-368

FILE pointers, 368-369

fopen() function, 362-364

formatted, 346-358

printf() function, 346-353

fprintf() function, 367

fputs() function, 367-368

fscanf() function, 367

getc() function, 364

putc() function, 364

redirecting to files, 358-362

remove() function, 370-371

rename() function, 370

I/O (input/output) functions, 477-482

isLeapYear() function, 172

J-K

[top]

JavaScript,

Kernighan, Brian W., 505

keywords

const, 442

pointers, 251-252

restrict, 442

Kochan, Stephen, 508

L

[top]

languages, programming, 5-6

interpreters, 10

left shift operator, 285-288

Liberty, Jesse, 507

linked lists, pointers, 243-251

Linux, 7

literals, compound, 454-455

initializing structures, 178-179

logical operators, 447

long double data type, 433

long double strtold (s, end) function, 484

long double_Complex data type, 433

long ftell (filePtr) function, 480

long int data type, 26-28, 433

long int labs (l) function, 493

long int lrint (x) function, 489

long int lround (x) function, 489

long int strtol (s, end, base) function, 484

long long int data type, 27-28

long long int llabs (ll) function, 493

long long int llrint (x) function, 489

long long int llround (x) function, 489

long long int strtoll (s, end, base) function, 484

lookup() function, 221-226

loops, for

nested, 53-55

variants, 55-56

M

[top]

Mac OS X, 7

macros, DEBUG, 395-396

main() routine, 119-120, 126, 137

make utility, 341-342

Makefile, 341-342

math functions, 485-492

memory addresses, pointers, 273-275

memory allocation, dynamic, 384-389

memory functions, 475-476

methods, OOP (object-oriented programming), 414-416

Microsoft Windows, 7

MinGW (Minimalist GNU for Windows), 506

minimum() function, 138-141

mistakes, programming, 499-503

modifiers, type, 442

modular operator, 35-36

modules, communication between, 334-340

multibyte characters, character strings, 432

multidimensional arrays, 113-115, 436-437

multidirectional arrays, 146-151

multiple expressions, for loops, 55

N

[top]

naming files, 7

nested if statements, 74-76

nested loops, for, 53-55

Newton-Raphson Iteration Technique, 131-133

null statement, 374-375, 462

null string, 211-214

numberOfDays() function, 169-172

numbers

Fibonacci, generating, 103-104

prime, generating, 104-106

numread = fread (text, sizeof (char), 80, in_file) function, 479

O

[top]

objects, OOP (object-oriented programming), 413-414

omitted variable, 456

omitting fields, for loops, 55

ones complement operator, 283-285

OOP (object-oriented programming)

defining

C# class to work with fractions, 424-426

C++ class, 421-424

objective-C class, 417-421

instances, 414-416

methods, 414-416

objects, 413-414

writing program to work with fractions, 416

OpenGroup.org, 506

opening files, fopen() function, 362-364

operating systems, 6-7

operations, pointers, 271-272

operators, 443-445

##, 310

arithmetic, 31, 446-447

assignment, 39, 141-143, 449

bit, 278-291

Exclusive-OR, 282-283

left shift, 285-288

ones complement, 283-285

right shift, 286-288

bitwise, 448

AND, 279-281

Inclusive-OR, 281-282

comma, 378, 451

conditional, 90-92, 449-450

decrement, 267-270, 448-449

increment, 267-270, 448-449

logical, 447

modular, 35-36

relational, 46-50, 447-448

sizeof, 450-451

type cast, 38-39, 450

unary minus, 33-39

optimization, programs, 262

output, aligning, 50-51

P

[top]

perror() function, 371

Petzold, Charles, 507

Plauger, P. J., 505

pointers, 233, 440

arrays, 258-270, 453-454

basic operations, 452-454

character strings, 264-266

constant, 266-267

expressions, 237-238

functions, 252-258, 272-273, 460

illustrating, 235

indirection, 233-234

keyword const, 251-252

linked lists, 243-251

memory addresses, 273-275

operations, 271-272

structures, 239-251, 453-454

variables, defining, 234-237

portability, programs, #define statement, 302-303

Prata, Stephen, 507

precision modifiers, printf() function, 347

predefined identifiers, 470

preprocessor, 297, 464

conditional compilation, 314-317

debugging programs, 391-397

directives, 465-470

#define, 465-467

#error, 467

#if, 467-468

#ifdef, 468

#ifndef, 468

#include, 468-469

#line, 469

#pragma, 469

#undef, 469-470

statements

#define statement, 297-311

#elif statement, 316-317

#else statement, 315

#endif, 316

#if statement, 316-317

#ifdef, 314-316

#include statement, 311-314

#undef statement, 317-

trigraph sequences, 464

prime numbers, generating, arrays, 104-106

print_list() function, 252

printf() function, 13-17, 31-32, 119, 123, 137, 269, 345, 358

conversion characters, 348

flags, 347

formatting data, 346-353

illustrating formats, 349-351

precision and width modifiers, 347

type modifiers, 347

printMessage() function, 120-121

process() function, 393-394

program looping, 43

do statement, 60-63

program input, 51-56

for statement, 44-51

triangular numbers, 43-44

while statement, 56-60

programming

common mistakes, 499-503

OOP (object-oriented programming), 413

defining C# class to work with fractions, 424-426

defining C++ class, 421-424

defining objective-C class, 417-421

instances, 414-416

methods, 414-416

writing program to work with fractions, 416

top-down, 137

Programming C# 3.0, 507

Programming in Objective-C, 508

Programming in the Key of C#, 507

programming languages, 5-6

interpreters, 10

OOP (object-oriented programming), objects, 413-414

programs, 5

building, 9

comments, 17-19, 429

compiling, 7-12

conditional compilation, 314-317

gcc command, 495-497

debugging, 391

gdb (GNU Debugger), 397-411

preprocessor, 391-397

dividing into multiple files, 331-334

executing, 9-10

extendibility, #define statement, 301-302

first, assessing, 13-15

forcing termination, exit() function, 369-370

optimization, 262

portability, #define statement, 302-303

running, 11, 12-13

prototype declaration, functions, 124

putc() function, 364

putchar() function, 346

Q-R

[top]

qualifiers, type, 379

ranges, integers, 23

reading character strings, 205

readLine() function, 208-210

recursive functions, 158-160

register qualifier, 379

register variable, 456

relational operators, 46-50, 447-448

remove() function, 370-371

rename() function, 370-371

renaming files, rename() function, 370-371

restrict keyword, 442

restrict qualifier, 379-380

results, functions, returning, 126-130

return statement, 462-463

return types, functions, declaring, 133-135

returning function results, 126-130

right shift operator, 286-288

Ritchie, Dennis M., 505

rotate() function, 288-291, 314-315

rotating bits, 288-291

running programs, 11-13

S

[top]

scanf() function, 59, 119, 177, 204-206, 358, 392

conversion characters, 353

conversion modifiers, 353

formatting data, 353-358

sed command (Unix), 343-344

shift functions, 286-288

short int data type, 27-28, 433

single-character input, character strings, 206-211

single-dimensional arrays, 435

size_t fread (buffer, size, n, filePtr) function, 479

size_t fwrite (buffer, size, n, filePtr) function, 480

size_t strcspn (s1, s2) function, 474

size_t strlen (s) function, 474

size_t strspn (s1, s2) function, 475

size_t strxfrm (s1, s2, n) function, 475

sizeof operator, 450-451

sort() function, 143

sorting arrays, 143

source file display, gdb (GNU Debugger), 401

source files, compiling multiple from command line, 332-334

specifiers, data types, 26-28

sprintf() function, 482-483

square roots, calculating, 130-133

squareRoot() function, 131-134, 137, 155-156

sscanf() function, 482-483

stack traces, obtaining, gdb (GNU Debugger), 406-407

Standard C Library, The, 505

standard header files, 471-473

statements, 460

break, 62, 460

compound, 460

continue, 62-63, 460

debug, adding with preprocessor, 391-392

#define, preprocessor, 297-311

do, 60-63, 461

for, 44-51, 461

goto, 373-374, 461

if, 65-83, 461-462

compound relational tests, 72-74

else-if, 76-83

if-else, 69-72

nested, 74-76

#include, preprocessor, 311-314

null, 374-375, 462

preprocessor

#elif, 316-317

#else, 315

#endif, 316

#if, 316-317

#ifdef, 314-316

#ifndef, 314-316

#undef, 317

return, 462-463

switch, 83-86, 463-464

typedef, 441

extending data types, 323-325

while, 56-60, 464

static variables, 456

versus external, 337-339

stderr FILE pointer, 368-369

stdin FILE pointer, 368-369

stdout FILE pointer, 368-369

Steele, Guy L. Jr., 505

storage classes, 456

functions, 456

variables, 456

storage sizes, integers, 23

storing dates, structures, 164-169

string functions, 474-475

stringLength() function, 198, 217

strings, character, 193-194

arrays, 218-226

arrays of characters, 194-196

character operations, 226-229

concatenating, 200-201

constant strings, 217-218

counting characters in, 198-199

displaying, 199-202

escape characters, 215-217

initializing, 199-202

inputting, 204-206

null string, 211-214

pointers, 264-267

reading, 205

single-character input, 206-211

structures, 218-226

testing for equality, 202-204

variable-length, 197-214

string-to-number routines, 483-484

Stroustrup, Bjarne, 421, 507

structures, 163-164, 437-439

arrays, 180-181, 185-186

basic operations, 452

character strings, 218-226

containing structures, 183-185

functions, 169-177

illustrating, 165, 186-187

initializing, 178-179

pointers, 239-251

setting, gdb (GNU Debugger), 407-408

storing dates, 164-169

storing time, 175-177

using in expressions, 166-169

variants, 189

switch statement, 83-86, 463-464

system ("mkdir /usr/tmp/data") function, 494

system include files, 313-314

T

[top]

tables, prime numbers, generating, 86-87

test() function, 254

testing character strings for equality, 202-204

tests, compound relational, if statements, 72-74

text editors, 7

top-down programming, 137

triangular numbers, 43-44

trigraph sequences, preprocessor, 464

type cast operator, 38-39, 450

type definitions, 319

type modifiers, 442

printf() function, 347

type qualifiers, 379-380

typedef statement, 441

extending data types, 323-325

U

[top]

unary minus operators, 33-39

unions, 375-378, 439-440

universal character names, 428

Unix, 7

Unix utilities, 343-344

unsigned char data type, 433

unsigned int constant, 27-28

unsigned int data type, 433

unsigned long int strtoul (s, end, base) function, 484

unsigned long long int strtoull (s, end, base) function, 484

unsigned specifier, 278

utilities

cvs, 343

make, 341-342

Unix, 343-344

V

[top]

values, variables, displaying, 15-17

variable-length arrays, 115-117, 436

variable-length character strings, 197-214

variables, 21, 29-30

auto, 456

automatic local, 124-126, 155-158

_Bool, 24-26

Boolean, 86-90

char, 24

declaring, for loops, 56

displaying values of, 15-17

extern, 456

external, 334-337

versus static, 337-339

global, functions, 151-155

omitted, 456

pointers, defining, 234-237

register, 456

static, 155-158, 456

versus external, 337-339

storage classes, 456

volatile, 442

working with, gdb (GNU Debugger), 400-401

variants

for loops, 55-56

structures, 189

vim text editor, 7

Visual Studio, 506

void *calloc (n, size) function, 484

void *malloc (size) function, 485

void *memchr (m1, c, n) function, 476

void *memcmp (m1, m2, n) function, 476

void *memcpy (m1, m2, n) function, 476

void *memmove (m1, m2, n) function, 476

void *memset (m1, c, n) function, 476

void *realloc (pointer, size) function, 485

void clearerr (filePtr) function, 477

void data type, 433

void exit (n) function, 493

void free (pointer) function, 485

void perror (message) function, 481

void qsort (arr, n, size, comp_fn) function, 493-494

void rewind (filePtr) function, 481

void srand (seed) function, 494

volatile qualifier, 379

volatile variable, 442

W-Z

[top]

while statement, 56-60, 464

wide character constants, 431

wide character string constants, 432

width modifiers, printf() function, 347

writing functions, 120