A: 

If h is your heap and is a max-heap, its indexed from 0, and n is the number of elements, then this should work:

int position = n - 1;
while (position > 0 && h[(position - 1) / 2] <= h[position]) // while the parent of the current node is smaller than the current child, swap it with its child (only in case of a max-heap, it's the other way around for a min-heap)
{
    swap(h[(position - 1) / 2] = h[position]);
    poistion = (position - 1) / 2;
}

i have question about loop for example where is starting point of loop?

The loop starts with the last element of the heap array, as that is usually the one you want to move to the right position.

IVlad