Sams Teach Yourself C in 24 Hours (80 page)

BOOK: Sams Teach Yourself C in 24 Hours
3.81Mb size Format: txt, pdf, ePub

378

stdlib.h header file, 302,

(%s), 79

functions, passing,

440

string.h header file, 302,

319-321

stdout file stream, 433

440

initializing, 317-319

stdout stream, 72

strings, 208

integers, assigning, 315

storage, memory, 343

copying, 213-215

members, 314-315

storage classes, 229

initializing, 208-211

nested, declaring, 327

auto specifier, 229-231

lengths, measuring,

nesting unions, 343-346

extern specifier, 234

212-213

pointers, referencing,

modifiers, 234-235

pointers, arrays,

322-324

register specifier, 233

272-274

size, 339-341

static specifier, 230

reading, 217

tag names, 314

storing variables, regis-

strlen() function, 212-213

union comparison, 351

ters, 233

StrPrint() function, 386

union initialization, 338

strcpy() function,

struct data type, 424-425

variables, 314-315

213-215, 336

bit fields

style (programming),

streams, 72, 433

code example,

418-419

binary, 356, 370

348-350

subtracting integers,

defined, 356

declaring, 347

pointers, 259, 263-264

device independence,

struct keyword, 56, 347

subtraction assignment

356

structure members, ref-

operator (-=), 93

files comparison, 356

erencing, 315-319

subtraction operator (-),

96

34 067231861x index 1/25/00 10:45 AM Page 526

526

switch statement

switch statement, 56, 155,

transistors, 13

nesting

161-164

trigonometry functions,

code example,

braces, 165

149-150

344-345

case keyword, 162

troubleshooting.
See

in structures,

conditional expressions,

debugging

343-346

161-162

truncation (division), 100

referencing, 335-337,

exiting break state-

turning off optimizers,

351

ments, 164

235

referencing memory

form, 161

typedef keyword, 57, 300,

locations, 341-343,

listing, 162

321, 426

352

statement execution,

advantages, 300-301

size, 339-341

164

listing, 301-302

structures comparison,

unlimited decisions,

updating, 301

351

161

tag names, 334

switches, 13

variables, defining,

synonyms

334-335

data type names, 300

U

UNIX systems, require-

declaring, 300

ments, 17

defining, 321

%u (unsigned integer)

unsigned data modifier,

system requirements,

format specifier, 79

143-145

16-17

unary deference operator

unsigned hexadecimal

(*), 182

format specifier (%x),

unary minus operator (-),

79

95

unsigned integer format

T

#undef directive, 393-394,

specifier (%u), 79

406, 434

unsigned keyword, 57

\t (tab character), 60

uninitialized pointer

unsigned octal format

tag names

errors, 262

specifier (%o), 79

structures, 314

union data type, 425-426

unsized arrays

unions, 334

union keyword, 57

character arrays, 209

tan() function, 149-150

unions, 334

declaring, 201

temporal regions (vari-

arrow operator (->),

initializing, 202-203

ables), 229

335, 351

sizes, calculating, 201

temporary memory loca-

declaring, 334

updating definitions, 301

tions, 229

dot operator (.),

uppercase, converting to,

text editors, require-

335-337, 351

302-303

ments, 17

initializing, 337-339,

user input, 72

text streams, 356, 370

351

getc() function, 72-74

time, converting, 250-251

memory sharing

getchar() function,

time() function, 250

code example,

74-75

time.h header file, 440

338-339

top down programming,

structures, 338

255

34 067231861x index 1/25/00 10:45 AM Page 527

%x (unsigned hexadecimal) format specifier

527

V

pointers, 176, 430-432

W-Z

register specifier, 233

registers, storing, 233

values

while keyword, 57

right value, 177

constants, 42

while loops, 106-107, 166

scope

enum data types,

whitespace, 29

block, 225

298-299

writing

block scope, 224

integers, default, 296

characters

file, 232

left, 187

from standard output

function, 226-227

pointer, assigning,

stream, 217

nested block scope,

180-181

puts() function,

225-226

right, 187

215-217

program, 227

variables, 42, 183-184

to standard output

program and block

variable arguments, pro-

stream, 215-216

scope comparison,

cessing, 252-254

code

227-229

variables, 42.
See also

Borland C++, 21

spatial regions, 229

data types

Visual C++, 18

static specifier, 230-231

assigning return values

files, 360

storage classes, 229

to, 47

binary, 378-381

structures, 314-315

auto specifier, 229

fputc() function,

temporal regions, 229

character, 58

360-363

values, 42, 183-184

const modifiers,

fputs() function,

volatile modifiers, 235

234-235

363-366

va_arg() macro, 252

declaring, 48, 177, 244

fwrite() function,

va_end() function, 252

floating-point num-

366-369, 381

va_start() macro, 252

bers, 64-65

random access,

viewing file position indi-

integers, 62-63

374-377, 387

cator value, 375

defining, unions,

sequential access,

Visual C++, 17

334-335

374

compiler, 18-21

extern specifier, 234

output, 75

running, 19

global, 227, 233

printf() function,

starting, 18

declaring, 229

78-79

IDE, 18

versus local, 418

putc() function,

void data type, function

groups, collecting, 314

75-76

declarations, 248-249

indirectly manipulating,

putchar() function,

void keyword, 57, 305

176

77-78

volatile keyword, 57

left value, 176

%x (unsigned hexadeci-

volatile modifier (vari-

lists, defining data

mal) format specifier,

ables), 235

types, 424

79

local, 225, 418

naming, 68, 418

Document Outline

Other books

Home Fires by Jana Richards
Revenge of Cornelius by Tanya R. Taylor
Cold Shot by Mark Henshaw
High Country : A Novel by Wyman, Willard
The Swarm by Frank Schatzing
The Remaining Voice by Elliott, Angela