not passing test case let me know about the error
Pivot of sorted and rotated array
your mistake
int a[n] this is not a correct
because n is not know at compile time but array is allocated at compile time
so correct is below
int a[100000];
Modified Code