Question: Lab 7 - Pointers 1 of 2 Task 1 Design a sorting algorithm in Flowgorithm that will sort a one-dimensional array of integers in ascending
Lab 7 - Pointers 1 of 2 Task 1 Design a sorting algorithm in Flowgorithm that will sort a one-dimensional array of integers in ascending order Task 2 Using your flow chart from Task 1 write a C++ fanction that e accepts a pointer to an integer of the first element of an array (or vector) and the size of the array and sorts the array (or vector) in ascending order. Note: you cannot use any built in sorting funetions - code up your own sorting algorithn. . You mst use pointers to access each element and may not use an additional array or vector variable to store values You nay only use the pointer to the first element in the list and integer temporary variables. Pay attention to the following . what temporary variables do you need? . do you need to return anything from your function? what type should the above function bel? Task 3 Read in a list of numbers from a file named input.txt into an array (or vector), sort the list using your function from Task 2 and write the sorted list to output.txt ab7.ter Ver. 3.141592 February 14, 2018 Page 1 of 2
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
