Question
< 7:10 ELEC1520_HW8.pdf Q Ө Program Questions (10 points apiece): For each program question, include a snap shot of your program and output generated from the program. Also, include the replit link for the program. (This is done by clicking on the "Invite" button and then copy the link.) 11. You are to write a C++ function that reads in data from a file of unknown length into an array. The function should first determine the number of data values in the array, and then dynamically create an array of the correct length, and then read in the data into the array. The function should return a pointer to the dynamically created array and the length of the array. Test your function using the numbers.txt file included with the homework. To verify, write a second function that outputs the array to a file with the filename passed to the function as a string. Show that your output file matches the original file. 12. You are to write a function that sorts the values in an array using the bubble sort algorithm. While this function was gone over in class, do not just copy the function, but re-write it using your own terms and variables. To test your bubble sort algorithm, use the function in problem 11 to read in numbers.txt into an array. Then, sort the array using your bubble sort code. Use the second function in problem 11 to write out your array to a file named sortedNumbers.txt. Verify that the values are properly sorted. ว 15 1 OOO DOO Dashboard Calendar To Do Notifications Inbox/n
Question image 1