#include <stdio.h>

/* Terry Harvey CISC105 Section 21 TA Aaron*/

/* Playing with strings; can you explain the behavior of this program? */

int main(){

    char words[100][20] = {"cat", "spud"};

    printf("%s\n", words[1]);

    words[1][2] = 'z';
    printf("%s\n", words[1]);

    strcpy(words[1], "abcdabcdabcdabcdabcdzz");

    printf("%s\n", words[0]);
    printf("%s\n", words[1]);
    printf("%s\n", words[2]);

    strcpy(words[2], "abcdabcdabcdabcdabcdzz");

    for (i = 0; i<100; i++)
	words[i][19] = '\0';

    printf("%s\n", words[0]);
    printf("%s\n", words[1]);
    printf("%s\n", words[2]);

    return 0;
}
