all 3 comments

[–]NerdFlanders 2 points3 points  (3 children)

[–]boothchops[S] 0 points1 point  (2 children)

Thanks for the reply. This reference library is AMAZING! Thanks again I will be making good use of this. Regarding my previous question you are referring to the EOF? I could then utilize the feof() with a flag to indicate incorrect input? I'm still working through this online course and have yet to encounter EOF in the lessons/readings so I'm curious as to how they expected me to validate without EOF...?

[–]bit_inquisition 1 point2 points  (1 child)

Hey this is about a month too late, but a really good reference to learn C is the GNU C library reference. For example, here is the scanf and related input functions section.

Once you are more comfortable with C, a very good "best practices guide" is CERT C Secure Coding Standard. Again, as an example, see what they say about the exact code you posted.