Beej's Guide to C Programming (2007)
The first listed program to add up all the integers from 1 to the scanned number wouldn't compile under GCC for me and the error was that "i" undeclared (first use in this function). I had to declare "i" as an "int" to make it work. It looks like it accepted the declaration in the top with num and result or within the for loop.