+ 1

Can we give an array a negative or out of bound index?

like : int c[20]; cout<<c[-10]<<c[50];

26th Sep 2017, 10:20 PM
Mohammad Amin Khanpour
2 Answers
+ 2
Did it work?
26th Sep 2017, 11:05 PM
👑 Prometheus 🇸🇬
👑 Prometheus 🇸🇬 - avatar
+ 2
Yes you can, though I can't quite explain that wierd output
26th Sep 2017, 11:06 PM
👑 Prometheus 🇸🇬
👑 Prometheus 🇸🇬 - avatar