You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Line 25 structure definition is incorrect, size of the tab of char should be day[10] and not day[9].
Try to enter the date 01 05 2024, the answer will be wednesdaythursday instead of wednesday.
That's because the '\0' is missing due to the wrong size definition, therefore the printf function looks for the '\0' of thursday which is next to wednesday in memory.
24 struct WeekDays {
25 char day[9];
26 };
The text was updated successfully, but these errors were encountered:
Line 25 structure definition is incorrect, size of the tab of char should be day[10] and not day[9].
Try to enter the date 01 05 2024, the answer will be wednesdaythursday instead of wednesday.
That's because the '\0' is missing due to the wrong size definition, therefore the printf function looks for the '\0' of thursday which is next to wednesday in memory.
24 struct WeekDays {
25 char day[9];
26 };
The text was updated successfully, but these errors were encountered: