Lecture 13 Outline (October 23, 2015)

Reading: text, §8.1–8.4

  1. Greetings and felicitations!
  2. String library functions
    1. Prototypes in include file string.h
    2. String length: strlen(str)
    3. String copy: strcpy(dest, src); strncpy(dest, src, number_chars)
    4. String catenation: strcat(dest, src); strncat(dest, src, number_chars)
    5. String comparison: strcmp(dest, src); strncmp(dest, src, number_chars)
    6. String tokenization: strtok(src, delim); program strtok.c

You can also obtain a PDF version of this. Version of October 28, 2015 at 1:40PM