On Jun 4, 2013, at 10:39 AM, David wrote: > It will segfault as it tries to print random memory. With gcc, it gives a compile warning first, even without -Wall. Hopefully the code challenges will reach the point where you can't figure t= hem out just by feeding the code provided to a compiler (a compiler than co= mpetes with the sponsor!) I'm not particularly happy that there are so many other issues with this co= de, beyond the answer that they seem to want. gcc -Wall foo.c foo.c: In function 'main': foo.c:9: warning: format '%s' expects type 'char *', but argument 3 has typ= e 'int' foo.c:9: warning: format '%s' expects type 'char *', but argument 3 has typ= e 'int' foo.c:5: warning: unused variable 'ch' foo.c:11: warning: control reaches end of non-void function Which is without Peter's quite valid "The code must check each argv[i], inc= luding argv[0], for NULL" complaint. > many simple-minded small-system C compilers generate more efficient code = for ++i than for i++ Hmm. I haven't run into that so much. In fact, the other way around; the = original PDP11 had post-increment and pre-decrement addressing modes (altho= ugh, that was for pointers, rather than loop counters=85) It's a valid thi= ng to watch out for, though. BillW --=20 http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .