by cokernel_hacker · 2y ago · 0 comments
int f(int x) {
static int y[] = {42, 43};
return y[x];
}
What behavior should `f(-1)` or `f(100)` have? What is sensible? *(y-1)
and more than likely segfault, or return the value at that address if it's somehow valid.