Answer to Question #229657 in C for swastica k g

Question #229657

All the students in a class are involved in any one of the Sports, be it indoor or outdoor. The details of their Names, Roll_no, Sport are recorded as a list. Write pseudocodes to return the following.

a.    Given a Roll_no, return the Sport(s) he/ she has registered.

b. Given a Sport, find the list of students who have enrolled for the same



1
Expert's answer
2021-08-25T23:52:48-0400
a)
A linked list can be used to store the details of the students.
Declare one stucture containing Names, Roll_no and Sport as data members.
Declare a function outside the structure to add student's details to the structure.
Use a function that accepts the student's Roll_no and returns sport the student is participating in.
b)
Create a function that accepts Sport as a parameter and return the list of students participating in that sport.
Traverse the whole linked list and display all the students participating in the sport provided. 

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS