Correct the memory size ot the array which should be NULL terminated.
Avoid side effect instructions and do not increment a counter while
accessing the array element but separate the instructions as per programming guide.