(Solved):Write a C++ program to : a. Create array arr1 of size 100 b. Assign values to elements such that – say index = i, arr1[i] = 100 – i. c. Print arr1 d. Create arr2 and copy alternate elements fro… View Answer…

 

Question

Write a C++ program to :

a. Create array arr1 of size 100

b. Assign values to elements such that – say index = i, arr1i = 100 – i.

c. Print arr1

d. Create arr2 and copy alternate elements from arr1 starting from index 1.

e. Print arr2.

 

EXPERT ANSWER

First, we determine the sizes of each array. Then, create the first array and assign values as explained in the question. Then, create the

Scroll to top