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 |
Struct(s) { int a; long b; } Union (u) {int a; long b; } Print sizeof(s)and sizeof(u) if sizeof(int)=4 and sizeof(long)=4
What is include directive in c?
declare afunction pointer to int printf(char *)?
How can we allocate array or structure bigger than 64kb?
What is time complexity c?
What is the use of typedef in c?
give an example of type casting by a simple c program
What is meant by inheritance?
a c code by using memory allocation for add ,multiply of sprase matrixes
How to declare a variable?
For what purpose null pointer used?
for (i <= 5 && i >= -1;++i; i > 0) { printf("%d ", i); }