I know it is a very simple code, but when printing the elements of the array the 4th element is printed twice like showed bellow.
void printWeekDays(){
char days[7][9] = { "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"};
for(int i=0; i < 7; i++){
printf("%s \n",days[i]);
}
Monday
Tuesday
WednesdayThursday
Thursday
Friday
Saturday
Sunday
Here is my environment:
Apple LLVM version 10.0.0 (clang-1000.11.45.5)
Target: x86_64-apple-darwin17.7.0