Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Security

Authors: Alfred Basta, Melissa Zgola

1st Edition

1435453905, 978-1435453906

Students also viewed these Databases questions

Question

Why do so many advertisers hire ad agencies? LO.1

Answered: 1 week ago

Question

URL Hashing Implement an algorithm to hash a URL as described.

Answered: 1 week ago

Question

=+4. What key skills are necessary to work in social media?

Answered: 1 week ago