This program asks the user enter three values being the indexes for elements of array k, and assigns to elements with these indexes the values 3, 4, 5 respectively.
So for safity it is necessary to enter numbers from 0 to 5.
Thus the values of k[1] and k[3] depend on indexes which the user enter.
For example
if the user input 0,1,2 then k[1]=4, k[3]=0
if the user input 3,2,4 then k[1]=0, k[3]=3
if the user input 5,0,3 then k[1]=0, k[3]=5
Comments
Leave a comment