Pivot of sorted and rotated array

not passing test case let me know about the error

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