Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

Binary tree traversing

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


Please Help Members By Posting Answers For Below Questions

What are the various types of control structures in programming?

1006


‎How to define structures? · ‎

1031


There is a practice in coding to keep some code blocks in comment symbols than delete it when debugging. How this affect when debugging?

1243


What is a void * in c?

1021


What does stand for?

1045


What is indirection in c?

1023


What does the error message "DGROUP exceeds 64K" mean?

1168


How many types of sorting are there in c?

1011


What is d'n in c?

1072


What is the difference between struct and union in C?

1241


What does 3 periods mean in texting?

1012


What are the benefits of c language?

1108


Why is c called "mother" language?

1230


In a switch statement, explain what will happen if a break statement is omitted?

997


What are the differences between new and malloc in C?

1072