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

How can I dynamically allocate arrays?

1042


Why functions are used in c?

1083


Write a C program to accept a matrix of any size. Find the frequency count of each element in the matrix and positions in which they appear in the matrix

1964


What is the difference between local variable and global variable in c?

1172


How does selection sort work in c?

996


hai iam working in sap sd module for one year and working in lumax ind ltd in desp department but my problem is i have done m.b.a in hr/marketing and working sap sd there is any combination it. can you give right solution of my problem. and what can i do?

2074


What is the deal on sprintf_s return value?

1077


Explain what math functions are available for integers? For floating point?

1073


Is c compiled or interpreted?

1141


What is a pragma?

1089


write a progrmm in c language take user interface generate table using for loop?

2004


What are the salient features of c languages?

1057


Why is c so important?

1007


What is a function in c?

1500


What does 2n 4c mean?

1196