Outline for May 17, 2002 Handouts: none Reading: Johnsonbaugh and Kalin, pp. 390-435, 679-702 (appendix of useful functions) 1. Greetings and felicitations! 2. Other Types a. bit fields b. unions c. enumerated types 3. Libraries a. compiling with libraries b. common libraries: stdio, ctype 4. Standard I/O Library (#include ) a. open file: fopen b. unstructured read/write: getchar, fgetc (getc), putchar, fputc (putc) c. formatted read/write: fgets (gets), fscanf, fputs (puts), fprintf d. structured read/write: fread, fwrite e. random access: fseek, ftell, rewind f. close file: fclose g. miscellaneous: feof, ferror, clearerr 5. Character types and conversions (#include ) a. alphabetics, numerics, alphanumerics: isalnum, ialdigit, isxdigit, isalpha b. ypper, lower, and conversions: isupper, islower, toupper, tolower c. types of chars: iscntrl, isgraph (not blank, printable), isprint (printable), ispunct, isspace 6. String conversion (#include ) a. string to number: atoi, atof, atol 7. String functions (#include ) a. compare: strcmp, strncmp, strcasecmp, strncasecmp; memcmp b. copy: strcpy, strncpy; memcpy (no overlap), memmove (overlap okay) c. find character: strchr (index), strrchr (rindex), strpbrk; memchr d. length: strlen 8. Memory management (#include a. Allocation: malloc, calloc b. Release: free, cfree (deprecated) c. Reallocation: realloc() 9. Miscellaneous a. terminate program (exit); include b. sort array of data (qsort); include c. time of day (time, ctime); include d. execute cvommand (system); include