I'm loving the book so far, and this is not that big of a deal. But for completeness, I thought I'd mention it. I hope I don't come off as pretentious, but you did say that we ought to inform you should we find any mistakes.
In page 55, you say "After the CODE runs, the INCREMENTS part is run, usually incrementing something such as in i++".
However, as I was playing around in the debugger, I noticed that the counter is incremented after the condition is met (even before the contents execute).
See the image below:
![Screenshot 2024-05-23 at 16 26 33](https://private-user-images.githubusercontent.com/140613896/333314987-ae9f702f-af9d-45e7-8139-8c30f1f44f5b.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjM2NTcyNTIsIm5iZiI6MTcyMzY1Njk1MiwicGF0aCI6Ii8xNDA2MTM4OTYvMzMzMzE0OTg3LWFlOWY3MDJmLWFmOWQtNDVlNy04MTM5LThjMzBmMWY0NGY1Yi5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwODE0JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDgxNFQxNzM1NTJaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1mYWVkOWFlOGE5Y2VhNDI2ZjUyOTgyZjE3YTFhMTU0ZDE3NmIzZTAzMTQ4MWJlNjVhMWM3NWIyMmQ3NzA4OTJkJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.xdNbHrn4cCNRtH191geAJtVjUd9koaFFrSo3_8-S_D0)
These were the following commands I used:
As you can see, at line 7 even before the printf
statement was executed, i
had incremented.
I could be wrong, but I thought I'd just share anyway. Thanks for writing this book, though. I didn't realise that drills could be so useful for understanding concepts well.