While building tree I am getting a segmentation fault
tell where I did mistake ??
Find Sum At Level K
@ashwani225

this is totally wrong.
if i = 0, it will work ok because no calls will be made for children node.
for i =1, there is only one child, you cannot call for right child
for i = 2, this loop will run twice, but you have to make calls to these functions only once.