the notation you've used is totally wrong. Because you can't be sure that the next element in memory is '\0' unless you have set that to zero like the string case. But this doesn't make sense, because in the strings '\0' is a special character not occurring at any position. But in an array,it's not clear that that zero indicates end of the array, or just a zero element. If you want to iterate over the array elements, a for from zero up to sizeof(numbers)/sizeof(int) solves the problem.