Sams Teach Yourself C in 21 Days

(singke) #1
member functions with time structure, 670
private/public data, 677
square class, 637
square functions, 632
time structure, 666
case sensitivity, 798-799
character-classification functions, 812-813
characters, checking for letters, 809-810
Clearing stdin of extra characters, 354-355
command-line arguments, 612
constructor/destructor order of operation with
inheritance, 697-698
continue statement, 312
counting characters, 475-477
data type sizes, printing, 802
displaying messages in windows, 749-750
drawing shapes onscreen, 751-753
error-handling functions
assert, 544
perror, 547
external variables, extern keyword, 290
fgets() function, 349
file I/O
copying files, 468
creating temporary filenames, 470
deleting disk files using remove(), 465
detecting end of file, 464
random file access, 461
reading formatted data, 449
renaming disk files using rename(), 467
find a number, 93-95
functions
passing by value/reference, 518
returning pointers, 527
variable-size arguments, 525
getch() function, 344-345
getchar() function, 342-343
gets() function, 238-239
hello.c, 16
with an error, 18

HTML code in AppletTest sample program,
761
if statements, 74-76
incrementing pointers, 272-273
infinite loops, 318
inheriting from base classes, 693-695
Java, Hello World, 644
Java applet skeleton, 759-760
Java classes
child classes, creating, 738
constructor definition, 733
constructor sample program, 733
creating, 726-727
inheritance sample program, 739-740
method sample program, 728-730
overloaded constructor definition, 735-
736
overloading methods, 731-732
parent classes, creating, 737-738
sample program, 726-727
linked lists
basic elements, 423
list of characters, 426-433
local variables
defining, 297
static versus automatic, 292
logical operator precedence, 84
malloc() function, 233-234
math functions, 536
memory allocation
calloc() function, 574
free() function, 577
malloc() function, 572
realloc() function, 576
memory manipulation
memset/memcpy/memmove() functions,
580
MethodsDemo.java program, 729-730
modular programming, 594

914 listings

51 448201x-Index 8/13/02 11:23 AM Page 914

Free download pdf