1 votes 1 votes Consider the following C program segment: struct node What is the output of above C program when it runs on a root node of a binary tree? prints nodes at K distance from root node. print nodes of Kth level of binary tree. Both (a) and (b) None of these DS binary-tree + – User007 asked Jan 25, 2017 User007 985 views answer comment Share Follow See all 11 Comments See all 11 11 Comments reply Show 8 previous comments pranjalgennext commented Jan 26, 2017 reply Follow Share I agree..A should be the correct option. Root is always taken as Level 1. 0 votes 0 votes Devshree Dubey commented Jan 26, 2017 reply Follow Share Level 0 also. It depends whether numbering starts from 1 or 0. :) 0 votes 0 votes User007 commented Jan 28, 2017 reply Follow Share Where have you read this before ? Kindly drop a link. 0 votes 0 votes Please log in or register to add a comment.
0 votes 0 votes Answer depends on numbering of levels: if levels starts from zero then C will be correct option if levels start from 1 then only A will be correct bthebestSelf answered Jan 15, 2021 bthebestSelf comment Share Follow See all 0 reply Please log in or register to add a comment.