[prev] [index] [next]

Tips for Next Week's Lab


Chars, strings and other arrays

  • Search for substrings
    • String library function strstr(s,sp) returns pointer to first sp in s
  • Use ctype.h library
    • isupper(c), islower(c), ...
  • Process command line options

    prompt$ ./asci -upper
    65 A	66 B	67 C	68 D	...
    73 I	74 J	75 K	76 L	...
    ...
    

  • Avoid magic numbers in your program code
  • Implement various 2d matrix operations (read, copy, add, compare matrices)