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
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.
Step by Step Solution
3.39 Rating (161 Votes )
There are 3 Steps involved in it
Here is an example of how you could carry out these tasks in t... View full answer
Get step-by-step solutions from verified subject matter experts
