Question
3. Modify the program of Example 05 so that, it takes and prints values using the following two functions respectively. void get (double *&a,
3. Modify the program of Example 05 so that, it takes and prints values using the following two functions respectively. void get (double *&a, int& n); void print (double *a, int n); 4. Following is a function for the (indirect) Bubble Sort. Here, on each iteration of the inner loop, if the floats of adjacent pointers are out of order, then the pointers are swapped. void sort (float * p[], int n) { float temp; for (int i = 1; i < n; i++). for (int j = 0; j < n-i; j++) if (p[j]*p[j+1]) { temp = p[j]; p[j] = p[j+1]; p[j+1] temp; } } Write and run a C++ program to test the above function.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Algorithm of the C Code Part 1 get and print Functions Function getdouble a int n Prompt the user to input a double value a and an integer value n Sto...Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started