Question: Write a C++ program that generates an initialized static integer array (A) of 10 integers, where A[i]=i and an uninitialized static array (B), of 10
Write a C++ program that generates an initialized static integer array (A) of 10 integers, where A[i]=i and an uninitialized static array (B), of 10 integers. The program gets an integer (say n) as an input from the user, checks that 1 10 and, using a while loop, copies the first n elements from A to B. If n does not comply with the requirement above, then the program prompts the user to reenter n.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
