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 types of preprocessor in c?

1112


How are structure passing and returning implemented?

1085


What is the time and space complexities of merge sort and when is it preferred over quick sort?

1130


What is a shell structure examples?

1148


How many types of errors are there in c language? Explain

1022


Write a factorial program using C.

1118


What is a good way to implement complex numbers in c?

1086


Differentiate fundamental data types and derived data types in C.

1086


Tell me what is the purpose of 'register' keyword in c language?

1035


What is a program flowchart and explain how does it help in writing a program?

1357


Explain what is #line used for?

1114


How can I do graphics in c?

1070


What is the best way to store flag values in a program?

1122


How to draw the flowchart for structure programs?

9387


What is bss in c?

1157