I am new to sorting techniques, i need a help on sorting of an array by Even numbers followed by Odd numbers in the array.after the complete execution of the above for loop sort_arry containsCode:int arr[10] = {5,3,4,12,1,6,15,24,35,2}; int size = 10; int End_Count = size-1; int Start_Count = 0; int sort_array[10]; for(int temp = 0; temp<size; temp++) { if(arr[temp]%2) { sort_array[End_Count] = arr[temp]; End_Count--; } else { sort_array[Start_Count] = arr[temp]; Start_Count++; } }Thats what actually my sorting has to be.Code:sort_array = {4,12,6,24,2,35,15,1,3,5}
But my question is, how can i do this sorting without using another array?