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

Recommended Answers

All 4 Replies

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).

Am not good at c++ programes at all

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 :)

Am not good at c++ programes at all

No one is when they first start. That's the whole point of learning.

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.