I've brushing up on my C coding and going over some old exercises I did a couple of years back. I came accros a situation I am almost 100% sure it should give a segmentation fault, but instead the program runs smoothly and terminates correctly. Why is that happening?
#include <stdio.h>
int main(void){
int vals[6] = {0,0,0,0,0,0};
vals[8]++; //This should not be ok!!?
printf("Done");
return 0;
}