Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

4(15 Points Assume that following initialization is given in your structure allStudent1001 and data is sorted based on name field struct studiinfo int stNr, char

image text in transcribed

4(15 Points Assume that following initialization is given in your structure allStudent1001 and data is sorted based on name field struct studiinfo int stNr, char name[10]. Iname[10]; int grade int main already sorted base on name field struet studiinfo allStudent[100)- 97790. ADEM", KORKMAZ, 77, 963582, "AFGAR", "SEKER", 85 957434. "AHMED", "DABBAGH", 100 961229,"BAKI" "EKSI", 65, 971280. ZEKI "ELBAST"88: int n=100: * Total number of students A) (1 Points) Write a C function named as binary Search and search a given student get a name information from the monitor) in the given array allStudent), apply Binary Search algorithm which is listed below), and list student informationstNr. name, Iname, grade) If student in not found give an error message that "Student is not found". B)(8 Points) Write a C function named as sortBubble() that will sort the student information by Student Number(str) applying by Bubble Sort method, and after sort operation list sorted student information in the main program. procedure BINSEARCH(A, n, x, j)// This is Sparks Algorithm, Lower and upper limits are 1 and n for the array A(1:n), x is the search information lower + 1, uppern *** binSearch() and SortBubble() funetions While lower A(mid): lover mid +1 : x

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Microsoft SQL Server 2012 Unleashed

Authors: Ray Rankins, Paul Bertucci

1st Edition

0133408507, 9780133408508

More Books

Students also viewed these Databases questions

Question

=+4 Develop and deliver the CCT program.

Answered: 1 week ago