A different implementation of Heap Sort
You have no extra spacing between functions except before the main() function, which has several returns.  I would put a single return between each function to make it clear where they begin and end without even looking.



You use spaces between variables and operators inconsistently, and you should be consistent:

printArray(arr, arr_size);
heap_sort(arr,0,arr_size-1);

for (i=0; i &lt; n; i++)


There are others as well.  I would recommend using a space for readability.

I would put spaces around variables in function definitions as well:

void heapify(int[],int,int);




You don't need two return 0;s at the end of main().



While not absolutely necessary, it might help prevent bugs if you use braces around one-line ifs and loops:

for (i=0; i &lt; n; i++)
    printf("%d ", arr[i]);




Your brace style here is rather peculiar:

if(size%2){
    if(a[l+i]&lt;a[l+i/2])
        swap(a,l+i,l+i/2);
    i--;}


That final brace should be written on the line below.  I would use more spaces and braces as well:

if(size % 2) {
    if(a[l + i] &lt; a[l + i / 2]) {
        swap(a, l + i, l + i / 2);
    }
    i--;
}