The array (1,8,6,2) is intial input into INSERT function. Every one loop to the place of index 1 (2nd element) is insert "i" value. All elements are moved to next index. So before first execute the array is (1,8,6,2), "i" is 0 in first execute, so number 0 is insert on index 1 - array will be (1,0,8,6,2). Than i is 1 so (1,1,0,8,6,2) , than 2 (1,2,1,0,8,6,2) etc..
upvoted 3 times
...
...
Log in to ExamTopics
Sign in:
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
Xlast
4 years, 7 months agoLui99
4 years, 7 months ago