You're also assigning into arr_new[5] which is out of bounds. Good attempt, but consider what I said about two nested for loops or simply reworking the values of the i and j variables as they loop. ...and to blumfluff, look at his results and see why I said you shouldn't post broken code. Now the guy is even more confused then he was to start.