GATE CSE 2004 Q.23 || Trees ||Data Structure || GATE Insights Version: CSE
Автор: GATE Insights Version: CSE
Загружено: 2021-08-17
Просмотров: 521
Описание:
Planning to take coaching on https://unacademy.com/
here is a code for 10% off PLUS1BPK1
Downloads resources from here
https://education4fun.com/gate-cse/
MCQ (Single Correct Answer)
GATE CSE 2004
Consider the following C program segment
struct CellNode
{
struct CelINode *leftchild;
int element;
struct CelINode *rightChild;
}
int Dosomething(struct CelINode *ptr)
{
int value = 0;
if (ptr != NULL)
{
if (ptr----leftChild != NULL)
value = 1 + DoSomething(ptr----leftChild);
if (ptr----rightChild != NULL)
value = max(value, 1 + DoSomething(ptr----rightChild));
}
return (value);
}
The value returned by the function DoSomething when a pointer to the root of a non-empty tree is passed as argument is
A) The number of leaf nodes in the tree
B) The number of nodes in the tree
C) The number of internal nodes in the tree
D) The height of the tree
Повторяем попытку...
Доступные форматы для скачивания:
Скачать видео
-
Информация по загрузке: