Hello, I am very new to C and having the hardest time with arrays. I am attempting to find a pivot point in a sorted array for example { 1 2 4 5 9 } might become { 5 9 1 2 4 }. I am thinking it should be something to the degree of start at array[size] and if it is larger than array[size-1] continue if not array[size] is the pivot point. I could be completely off in that assumption but regardless I am having problems coding it either way. Could anyone shed some light on this for me or let me know if I am completely off target.
#include<stdio.h>
#define size 5
int main(void)
{
int array[size] = {4, 8, 0, 1, 3};
int prev = array[size-1];
int last;
int pivot;
for (last = array[size]; last >= prev; prev--)