Lecture Summaries - Week 13
Jump To:
[Lecture Index |
Previous Week's Lectures |
Next Week's Lectures]
Topics covered:
- What is a string.
- How we create strings.
- How to read characters into a string with scanf.
- How to read a line into a string with getline.
- How to compare string with strcmp.
Reading: Chapter 10.1, 10.2, and 10.3
Topics covered:
- Why we terminate strings with a null character.
- How we pass strings as parameters.
- Writing a function to write a string on a line by itself
without using printf
(putline.c).
- Writing functions to deal with more than one string at a time.
- An initial version of strcmp (this one has a bug)
(strcmp.c).
- How to hand-check functions.
- How to write testing programs.
- An example program to test our initial strcmp function
(testit.c).
- One way to fix strcmp
(strcmp2.c).
- Another way to fix strcmp
(strcmp3.c).
Reading: Chapter 10.4.
Topics covered:
- What sequential search is and why it's useful.
- How to search a string for a particular character.
- How to use pointers to access substrings.
- Printing an ending part of a string with printf
(printlast.c).
- Printing a beginning part of a string with printf
(printfirst.c).
- How to use some new standard library functions (strcpy,
strcat, strncpy, strncat).
- A clean way to print the beginning part of a string with
printf
(printfirst2.c).
- Converting a string that's first name last to last name first
(convert.c).
- How using existing functions often saves us a great deal of
work, even when they don't do exactly what we want them to.
Reading: Chapter 10.4.
[EE150 Home Page |
Top Of Page]