Lauren
2014-11-29 11:19:27 UTC
pointer p which directs to the first element of the array. Now, change the order of the array USING pointer p
as describes below and show the changed array as a result.
Original order: 1,2,3,4,5
Output order: 5,4,3,2,1
I believe you should implement a selection sort. however, I am directed to only use one function, a main function. and use temp variable to switch the order.
all i have so far is:
#include
int main(void) {
int array[5]={1,2,3,4,5};
int *p=array;
}