Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I need this answered using C programming not C++ please. So no cout or any functions used in C++ You are to read a song

I need this answered using C programming not C++ please. So no cout or any functions used in C++ image text in transcribed
You are to read a song database from a fle that contains the following data attnibutes for each song artist, album, genre, year,and duration Write a C program that a) Asks the user to enter the file that contains the song database. b) Reads the songs from the file into an array of type song of size up to 100 songs (the file is assumed not to exceed this limt) c) Alows a userto query for any songs that match a char attribute our program MUST use the following strecture char album[1e0]: int year int duration song Note that the duration is stored in seconds, but should be displayed in the format mmss when printed on Your program MUST use the blowing twe user-defined unctions-You are allowed to add arguments to the functions but not remove. You are allowed to develop other functions song readSong(FILE inp): Wreads one song from the file pointed by inp and returns it vold printSongsongs):prints all attributes of a song pointed by s void searchSong (song. int size, char target[. Int att): xis the array of songs,size is the length of the anray, target is the target string the user is searching for, and att is & to search by titie, 1 to search by artist, or 2 to search by album. Printing of satohing songs occurs within ths function by calling the printsong function Note: You will not be penalized if you choose to use a dynamically allocated array. Sample Code Execution: Bold entered by a user Enter the song database lename: Mysangs.t Enter the song database lename: songs Database successfully loaded Press 0 to search by Se 1 to search by artist, or 2 to seanch by abumu Press 0 to search by Sitle. 1 to search by artist, or 2 to seanch by abumt Enter Be name of the artist you woud ike to search for Ramin Dissad Ramin Diawad 0.56 Blood of my blood Ramin Djawad Came of thrones soundrack

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

Database Development For Dummies

Authors: Allen G. Taylor

1st Edition

978-0764507526

More Books

Students also viewed these Databases questions

Question

What is the purpose of the Salary Structure Table?

Answered: 1 week ago

Question

What is the scope and use of a Job Family Table?

Answered: 1 week ago