The answer they're looking for is use of an uninitialized variable, and depending on it being it's default value. E.g:
int a; // default value 0
int b[10];
int main() {
for (;a++;a<10) {
b[a] = 0;
}
}
This will not crash when debugging, because you debug unoptimized code, so the default value will be applied. Nothing goes wrong with a starting out as 0. Gcc -O3 or -Os, however will not initialize the value, making it a random value, very unlikely to be 0, and b[a] will increase in address (in the "average case", caveats apply) until outside of the data segment, leading to SIGSEGV.
There will be a compiler warning about this though.
You can make this question harder by relying on link attributes. (look up what "static int c" does in the global scope).