Question: Write a small C++ program that does the following: 1. Declare 1 D array of integers with 20 elements 2. Declare 2 D array of
Write a small C++ program that does the following: 1. Declare 1 D array of integers with 20 elements
2. Declare 2 D array of integers (you should be able to figure the dimensions of this array).
3. Each row of the 2 D array will have the binary equivalent of one integer from the 1 D array
4. Mapping between the two arrays is sequentially (i.e. the first element of the 2 D array is the binary equivalent of the first element of the 1D array).
5. A function that populate the 1 D array randomly with integers from the range [1 31] inclusive
6. A function that will take the 1 D array and the 2 D array as parameters. This function will convert all integers in the 1 D array and store them in 2D array.
7. A function that displays the 1 D array after data generation
8. A function that Displays the 2D array after data conversion 9. Both arrays displayed on same screen to facilitate accuracy.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
