I was getting this error, and this is the most simplest one I would say.
Are you able to find what is wrong in the below program?
#define MAX_DAY 6
const char *days[MAX_DAY + 1] =
{
"Sunday",
"Monday",
"Tuesday",
"Wednesday",
"Thursday",
"Friday",
"Saturday",
"Invalid"
}; |
The array days size is just 7, but I initialized with 8 elements. After popping out the last one,
it started working. Click here to understand the program.
Comments
Post a Comment