Runtime Error(SIGSEGV)

a run time error is coming when i run turbo sort program please help me what means by this problem and how can i success my program

  1. The declaration of array as int a[10^6] is causing the run time error, change it to
    int a[1000000].

The elements field within square brackets [], representing the number of elements in the array, must be a constant expression, since arrays are blocks of static memory whose size must be determined at compile time, before the program runs.


Check here for more details

  1. Also the algorithm you are using for sorting the array has a complexity of O(t^2), which will lead to time limit exceeded(tle). Use some other algorithm like merge sort having a time complexity of O(t*log(t)).