Click here to Skip to main content
15,895,656 members
Please Sign up or sign in to vote.
1.00/5 (6 votes)
See more:
i want a simple program for implementing binary search tree in 'c' programming.
with explanation.
what is #define max indicate..
with explanation...
Posted
Updated 6-Jun-11 9:28am
v2

#define max informs the compiler that the name has a definition but no specific value. It can be used to tell the compiler to generate or not generate parts of the program.

I guess the rest of your question pertains to your homework which you will have to try yourself.
 
Share this answer
 
Comments
Abhinav S 6-Jun-11 13:27pm    
Yup that is a concise answer. 5.
Sergey Alexandrovich Kryukov 6-Jun-11 14:48pm    
You answered, my 5.
Please see my comments to OP's comments under the solution by Abhinav.
Based on OP comments, I'll mark the question as "abuse", that's it.
--SA
Richard MacCutchan 6-Jun-11 15:28pm    
I agree with your comments below, but I think marking this as "abuse" is rather harsh. I would rather just add the "GimmeCode" tag, which I have done.
Sergey Alexandrovich Kryukov 6-Jun-11 17:54pm    
Maybe you're right. Usually I don't do it, but this time I was irritated not by the question itself, but by OP's comments; this is not being impudent but feels like ignorance. No problem, OP's account won't be banned just because of this report. :-)
--SA
Here is a couple of links:
This will help to explain #define max: C preprocessor[^]

I think it's useful to take a look at production quality code when you are learning to code - like glib at the Gtk+ Project[^] - there is an implementation that I hope you'll find useful Balanced Binary Trees[^]


Best regards
Espen Harlinn
 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 6-Jun-11 17:52pm    
OK, that was you how agreed to OP's "give me code" request. My 5.
--SA
Espen Harlinn 7-Jun-11 10:59am    
Thank you, SAKryukov!
Do a search on the internet you should find tons of samples and algorithms that implement these algorithms.
I would recommend you pick up a book and read up on algorithms before implementing anything, just to help you get started.
 
Share this answer
 
Comments
tusharkaushik 6-Jun-11 13:17pm    
sorry sir! ican't understand the answer.
this is not relevant answer of my query...
Richard MacCutchan 6-Jun-11 13:19pm    
This is very relevant. You are expected at least to make an attempt to do your own work rather than expecting someone to give you a ready made solution.
Abhinav S 6-Jun-11 13:22pm    
Thanks Richard.
Abhinav S 6-Jun-11 13:24pm    
You need to book up on algorithms and go through. That is all Im trying to say.
Sergey Alexandrovich Kryukov 6-Jun-11 14:42pm    
This is very relevant. It looks like you are incapable and lazy. In this case, no answer can help you.
--SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900