When k = 3; then k+1 is 4 which will be undefined access.



Tim S.