Carry out the following tasks with an array: a. Allocate an array a of ten integers. b.

Question:

Carry out the following tasks with an array:

a. Allocate an array a of ten integers.

b. Put the number 17 as the initial element of the array.

c. Put the number 29 as the last element of the array.

d. Fill the remaining elements with –1.

e. Add 1 to each element of the array.

f. Print all elements of the array, one per line.

g. Print all elements of the array in a single line, separated by commas.

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question
Question Posted: