If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.
The teacher is telling him "Nice try" because no one would write C code like that. The standard convention is:
Code:
for (count = 0; count < 500; count++)
Constantly going from 0 to 1 indexed is an excellent way to introduce off by one bugs. And if he wanted to avoid lint complaining, he would use (void)printf since you aren't using the return value.
Comment