I am just playing around with a simple c code. I want to print all the days string in the days array pointer. However I am running to segmentation fault. The problem lies in the for loop. What am I doing wrong here. Thanks
main(){
  const char *days[] = {"Sunday", "Monday", "Tuesday", "Wednesday",\
                        "Thursday", "Friday", "Saturday", "Sunday"};
  int i;
  for(i = 0; i < sizeof(days); ++i)
   printf( "%s\n", days[i]);
}
 
     
    