CSC161 2010F Imperative Problem Solving
[Skip to Body]
Primary:
[Front Door]
[Schedule]
-
[Academic Honesty]
[Instructions]
Current:
[Outline]
[EBoard]
-
[Assignment]
[Lab]
Groupings:
[EBoards]
[Assignments]
[Examples]
[Exams]
[Handouts]
[Labs]
[Outlines]
[Readings]
Related Courses:
[CSC195 2003S (Rebelsky)]
[CSC161 2009F (Coahran)]
[CSC161 2010S (Walker)]
Misc:
[SamR]
[ISO]
[GNU Coding Standards]
Back to Pointers and Arrays. On to Pause for Breath.
This outline is also available in PDF.
Held: Monday, 1 November 2010
Summary: We begin to consider the design of strings in C.
Related Pages:
Notes:
Overview:
strlen (str)
- find the number of characters in str.
strcpy (target, source)
- copy string from source to
target.
strncpy (target, source, n)
- copy up to n characters from
source to target.
strcat (target, source)
- put source on the end of target.
/** * strcpy: Copy source (s) to target (t). */ void strcpy (char *t, char *s) { char *result = t; while (*t++ = *s++) ; return result; } // strcpy
Back to Pointers and Arrays. On to Pause for Breath.
[Skip to Body]
Primary:
[Front Door]
[Schedule]
-
[Academic Honesty]
[Instructions]
Current:
[Outline]
[EBoard]
-
[Assignment]
[Lab]
Groupings:
[EBoards]
[Assignments]
[Examples]
[Exams]
[Handouts]
[Labs]
[Outlines]
[Readings]
Related Courses:
[CSC195 2003S (Rebelsky)]
[CSC161 2009F (Coahran)]
[CSC161 2010S (Walker)]
Misc:
[SamR]
[ISO]
[GNU Coding Standards]
Disclaimer:
I usually create these pages on the fly
, which means that I rarely
proofread them and they may contain bad grammar and incorrect details.
It also means that I tend to update them regularly (see the history for
more details). Feel free to contact me with any suggestions for changes.
This document was generated by
Siteweaver on Wed Dec 8 10:57:11 2010.
The source to the document was last modified on Fri Aug 27 07:12:23 2010.
This document may be found at http://www.cs.grinnell.edu/~rebelsky/Courses/CSC161/2010F/Outlines/outline.34.html
.