Your scanf statement is asking for ONE number, and you are telling the compiler you want it stored in the 6th element of the array. Then you tell printf to print 5 numbers and pass ONE element...