hi to all user i am new in file handling , i know file handling but not much , my instructor taught me that use binary search tree in a file to search key value ,key value(like any thing such that record can be easily make out and comparision can be done ) there is a file which contains RRN (relative record no) and key and two more RRN . one RRN's key value is greatter than the given key value and another one's key value is less than the given key value .How to implement this methods .

sonu_1
Recommended Answers
Jump to PostIf the file is already sorted, then just read it into memory and use bsearch() to find the item you need. You will need to write the compare() function that you pass to bsearch().
If the file is not sorted, then read it into memory and use qsort() to sort …
All 4 Replies
phorce 131 Posting Whiz in Training Featured Poster
rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

sonu_1
Rizwanrana786 0 Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.