Sorry for the basic question—I'm a beginner. If I have an array like this, for example:
int test[4] = {1,2,3,4};
and then I do:
printf("%x - %x - %x\n", test[4], test[5], test[6]);
Why is the result
0 - 0 - <another number>
? Why are the first two always zeros if I go into array overflow?
Thanks, and sorry for the basic question
[link] [comments]






![The Gang Republic: Inside Haiti’s New Order (2026) - ~3 million people living in the grips of all-out gang war. France24 spent a fortnight filming in and around the Haitian capital, speaking to a population held hostage by this drawn-out crisis (CC) [00:52:38]](https://external-preview.redd.it/0j1B98qWy2MAsjLEwjT10EbknBToMVuWRJ-tUeZsTso.jpeg?width=320&crop=smart&auto=webp&s=041d55dee546ef807e7eda2e0d1d013111f02a25)

English (US) ·