3 ms·
This doesn't seem like a realistic mistake to me. The printf is just at the wrong indent level; this is the same mistake as: for(i=0; i<imax; i++) prin
by jimrandomh 11y ago
This doesn't seem like a realistic mistake to me. The printf is just at the wrong indent level; this is the same mistake as:
for(i=0; i<imax; i++)
printf("i=%i\n",i)
{
//...
}
Which also compiles and which is wrong in the same way. I don't recall ever having made or having seen this.
- S4M 11y agoWell, not really, because in the example you just gave, you would put the printf right between the braces as it should be. In the case originally discussed, you have no braces so you would have to add them, and that can be forgotten.