Question: solve question 2 in c++ fucntion receives an int pointer and a bool parameter. the function sorts ascending the array if the bool is true

solve question 2 in c++
solve question 2 in c++ fucntion receives an int pointer and a

fucntion receives an int pointer and a bool parameter. the function sorts ascending the array if the bool is true and sort decendng if the bool is false. the first element of the array is its size rest of the elements are the data values. write this function using pointer notation write a main program that opens a file and reads data, where data is present as follows 154812114151958376899977 // /////// the first digit is the size of the array where later are data values the main makes a dynmamic array of appropriate size and calls the above mentioned sort function. write down another funtion that removes duplicate values from a dynamic array and prints the original and smaller array with no duplicates. call and execute this function from main as well. Q2) Declare a two d dynamic array in the main, open up another file where data is stored, in a space separated manner as shown below, send the file handle and two d array to the function for filling up the array. then use the same function Gen_Bubble_Sort to sort columns. each even number column is sorted in ascending order while rest are sorted in descending order. also write down a function for printing the array that shall be called appropriately when needed you can use temp 1 d dynamic array/s if needed. DO NOT USE array notation in this question. File format for Q2 e.g following data represents a two d array of 33 the first two digits are ROW AND COLUMNS 33456345123 The two d array of above data is as follows 456 345 123

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!