+ 2
In the below codes, 1st works correctly, but second shows other output. Why?
https://code.sololearn.com/cWccE3P6Ls54/?ref=app https://code.sololearn.com/cjnEBN0v4L5g/?ref=app what is the mistake?
2 Antworten
+ 3
For scanf(), a space character is a delimiter, so it will stop reading a string when encountering one, and you won't be able to enter a full date. You can use fgets() instead, i.e. fgets( date, 30, stdin ).
https://en.cppreference.com/w/c/io/fgets
+ 3
Thank u