diff --git a/lcthw/ex13.c b/lcthw/ex13.c index 049c254..128612b 100644 --- a/lcthw/ex13.c +++ b/lcthw/ex13.c @@ -11,13 +11,14 @@ int main(int argc, char *argv[]) // let's make our own array of strings char *states[] = { - "California", "Oregon", - "Washington", "Texas", + "California", + "Oregon", + "Washington", + "Texas", + NULL, }; - int num_states = 4; - - for (i = 0; i < num_states; i++) { + for (i = 0; states[i] != NULL; i++) { printf("state %d: %s\n", i, states[i]); }