Answer Posted / 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 |
Post New Answer View All Answers
What is volatile, register definition in C
Wt are the Buses in C Language
How to get string length of given string in c?
How can a number be converted to a string?
What is the significance of scope resolution operator?
plz let me know how to become a telecom protocol tester. thank you.
any function have arguments one or more OR not . it is compulsary a) any function compulsary have one or more arguments b) any function did not have arguments. It is not compulsary c) it is optional it is not compulsary d) none of the above
How can you tell whether a program was compiled using c versus c++?
How can I ensure that integer arithmetic doesnt overflow?
Why are some ANSI/ISO Standard library routines showing up as undefined, even though I've got an ANSI compiler?
How can I get back to the interactive keyboard if stdin is redirected?
what is the c source code for the below output? 10 10 10 10 10 10 10 10 10 10 9 9 7 6 6 6 6 6 6 9 7 5 9 7 3 2 2 5 9 7 3 1 5 9 7 3 5 9 7 4 4 4 4 5 9 7 8 8 8 8 8 8 8 8 9
List the difference between a "copy constructor" and a "assignment operator"?
What are global variables and how do you declare them?
Q.1 write a program to create binary tree 1 to 16 numbers? Q.2 write a program to creat a binary search tree for the member that is given by user?