I guess this concept is in C++, i am just learning C++, still in the beggining stage,will try to know about it soon
i guess i can solve the problem,by calculating the number of words and assigning it to high,will b here soon if i get a problem......
User Profile
Collapse
-
-
yes sir..i have used fopen function to open the file,n fscanf to read the words,the words are arranged as in dictionary..to make the search faster i need to use binary search,i know how to perform binary search on a array,
logic would b..
mid=(low+high)/2;
while(low<=high )
{
if(key==a[mid])
number found;
else if(key>a[mid])
low=mid+1;
else
high=mid-1;
...Leave a comment:
-
Search for specific word in a file
how do i write a c program to search a word in a file....i know binary search is apt for it..if its a dictionary...ho w do we take the low value n high value..can somebody please help me out...
No activity results to display
Show More
Leave a comment: