From 41e45ff12ab0ba0d1d5a7de647b71b504d8774db Mon Sep 17 00:00:00 2001 From: Dan Buch Date: Fri, 9 Sep 2011 14:24:47 -0400 Subject: [PATCH] putting evil into my for-loop --- ex10.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/ex10.c b/ex10.c index c06d77b..75b34fe 100644 --- a/ex10.c +++ b/ex10.c @@ -4,9 +4,7 @@ int main(int argc, char *argv[]) { int i = 0; - for(i = 0; i < argc; i++) { - printf("arg %d: %s\n", i, argv[i]); - } + for(i = 0; i < argc && printf("arg %d: %s\n", i, argv[i]); i++); char *states[] = { "California", "Oregon",