Question: C++ - Arrays of Numbers Part 1 - (Using dice.cpp) Complete the program dice.cpp Part 2 - (Using freq.cpp) Complete the program freq.cpp Part 3

C++ - Arrays of Numbers

Part 1 -

(Using dice.cpp) Complete the program dice.cpp

Part 2 -

(Using freq.cpp) Complete the program freq.cpp

Part 3 -

Write a program that will have 4 functions:

input an array...use void inputData( istream &, int [], int);

print an array...use void printData( ostream &, const int [], int);

copy one array to another array in normal order... void copyArray( const int orig[], int dup[], int);

copy one array to another array in reverse order using... void revCopy( const int orig[], int rev[], int);

Write the main program to test the four functions you wrote

NOTE: Supply the data for both arrays...int a[4] = { 7, 14, 9,10}; int b[4]; To Test it..

Use copyArray(a,b,4); Use printData(cout,b,4);

THE SCREEN OUTPUT THEN WILL BE: 7 14 9 10

Do NOT create a local array inside the copyArray function. Creating such a " local" array inside the function causes it to exist only while the function exists. After the function returns, all of the local memory is reclaimed and disappears...ie the local array is deleted from memory

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!