csev / cc4e

C Programming for Everybody
https://www.cc4e.com/
Other
260 stars 90 forks source link

From Python to C - The Rosetta Stone Lecture (cc_02_03.c) #83

Closed edmspjp closed 4 months ago

edmspjp commented 4 months ago

According to the test I did on my Mac, there is an issue related with the C code you present. scanf is not stoping you to input more than 100 chars on name, and if you want to get 100 chars you need to define the name var with 101 length.

csev commented 4 months ago

The C code in the course is not supposed to be "best practice" or even secure. I am trying to reflect as best as I can, the C environment back in 1978.

edmspjp commented 4 months ago

Understood. Thanks for the clarification. I will take that in account before open other issues :-)