Question
In this task you need to do or include the following: Once the track information is loaded, prompt the user to enter a search string
In this task you need to do or include the following:
Once the track information is loaded, prompt the user to enter a search string (use the read_string() function from the input_functions library.
The search function should have the following prototype: search_for_track_name(tracks, search_name) where tracks is an array of tracks and search_name is the string being searched for. The function should return -1 if the track name is not found, otherwise it should return the array index of the track with that name.
Display a message indicating if the track has been found or not (this is provided in the sample code in Resources).
Make sure you test for a track that does exist and one that does not.
suce: corctine Favas Sas1airsnStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started