binary heap, implemented by c language