How to solve this ?I got mad because of this quation

Write a menu driven application using C language that performs some searching and sorting operations. Your application should be able to perform linear and binary search. In addition, it can perform sorting using one of the sorting algorithms as quick sort or selection sort. The input to the application should be a file with a list of some numbers. The result should be stored in a file.

It will show a menu of choices:

1-Linear Search
2-Binary Search

2 Years
Discussion Span
Last Post by Ancient Dragon

got mad because of this quation

Why? because you think it is too difficult?

As with most programs just do it a little bit at a time. In this case the first step would be to create a menu in main(), when read all the data from the file into an array (probably array of integers).

Do you know the difference between linear and binary search algorithms? If not they should be explained in your textbook or google to get them. A linear search just simply starts at the beginning of the array and sequentially searches the array for a specific value, the array need not be sorted. The binary search requires the array to be sorted so you would have to Sort the array (menu option 3) before attempting the Binary Search (menu option 2).


You can do it in whatever language you are good at and port it to C++. It will make more sense along the way.

Don't get mad, get busy :)

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.