Array indexing , implicitly in C , starts from 0 . So , for left child it is 2i+1 and 2i+2 for right child.

In case indexing starts from 1 , i.e &A[1] is the base address of your array , then left child is 2i and 2i+1 is right child.

In case indexing starts from 1 , i.e &A[1] is the base address of your array , then left child is 2i and 2i+1 is right child.