CS109A Notes For Lecture 3/15/96 Representing Strings
CS109A Notes For Lecture 3/15/96 Representing Strings
Representing Strings
Several approaches:
1. Character array with endmarker \0 if there is
a length limit.
2. Linked list of characters if the strings change
length without bound.
But pack several characters per cell to
save space, since pointers are 4{8 characters long.