Binary tree traversing
Answer / qint
void Traverse(Node *t)
{
if(NULL == t)
return;
//in-order traversing
Traverse(t->left);
printf("%d",t->data);
Traverse(t->right);
//pre-order
printf("%d",t->data);
Traverse(t->left);
Traverse(t->right);
//post order
Traverse(t->left);
Traverse(t->right);
printf("%d",t->data);
}
| Is This Answer Correct ? | 13 Yes | 0 No |
Why enum is used in c?
Why is c platform dependent?
what is diffrence between string and character array?
Can you write the algorithm for Queue?
0 Answers College School Exams Tests, TCS,
Which header file is used for clrscr?
Differentiate between Macro and ordinary definition.
What is indirection? How many levels of pointers can you have?
what is the difference between 123 and 0123 in c?
Is c object oriented?
two progs are given. one starts counting frm 0 to MAX and the other stars frm MAX to 0. which one executes fast.
What will be the output of the following program #include<stdio.h> void main() { int i=20; i-=i+++++i++; printf("%d",i); }
Why c is called top down?