Manually create and store these files (on the online compiler) and write a C++ program that opens each file and: 1. Count the number of values 2. Create a dynamic array with size equal to the number of values in step1 3. Read the file content again and store it in the dynamically allocated array The program will then sum up the array sizes in all files and dynamically create a big array with a size equal to the summation of the three sizes. The program will then concatenate the three arrays into the big array (which is dynamically allocated with the correct size, again the size here is equal to the summation of the three sizes). And print out all the arrays (define a print function to do that and call it from main()) Close all files and deallocate the arrays. Example output: Arr1 content: 1234 33 22 567 4 -9 -34 Arr2 content: 10 122 -3 40 331 22 567 4 -9 -34 99 100 203 -9 0 Arr3 content: -134 299 130 603 -19 10 ArrBig content: 1234 33 22 567 4 -9 -34 10 122 -3 40 331 22 567 4 -9-34 99 100 203-90-134 299 130 603 -19 10 Press any key to continue ... Note: your program must work correctly regardless of the number of values in each file. You cannot assume that the number of values in each file is fixed. If your program works only for the above exa considered. You can use the following skeleton code: #include #include using namespace std; /to do: declare and define your print function Ent main() Save Al Answers " L Saue AJL Answers to save all answers.
Manually create and store these files (on the online compiler) and write a C++ program that opens each file and: 1. Count the number of values 2. Create a dynamic array with size equal to the number of values in step1 3. Read the file content again and store it in the dynamically allocated array The program will then sum up the array sizes in all files and dynamically create a big array with a size equal to the summation of the three sizes. The program will then concatenate the three arrays into the big array (which is dynamically allocated with the correct size, again the size here is equal to the summation of the three sizes). And print out all the arrays (define a print function to do that and call it from main()) Close all files and deallocate the arrays. Example output: Arr1 content: 1234 33 22 567 4 -9 -34 Arr2 content: 10 122 -3 40 331 22 567 4 -9 -34 99 100 203 -9 0 Arr3 content: -134 299 130 603 -19 10 ArrBig content: 1234 33 22 567 4 -9 -34 10 122 -3 40 331 22 567 4 -9-34 99 100 203-90-134 299 130 603 -19 10 Press any key to continue ... Note: your program must work correctly regardless of the number of values in each file. You cannot assume that the number of values in each file is fixed. If your program works only for the above exa considered. You can use the following skeleton code: #include #include using namespace std; /to do: declare and define your print function Ent main() Save Al Answers " L Saue AJL Answers to save all answers.
C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter8: I/o Streams And Data Files
Section: Chapter Questions
Problem 5PP: (Data processing) Write a C++ program that reads the file created in Exercise 4, permits the user to...
Related questions
Question
write a c++
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution!
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 1 images
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Recommended textbooks for you
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr