Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In C language Problem 1: I am a movie critic and I would like to digitally archive my database of reviewed movies. Each movie review

In C language

Problem 1:

I am a movie critic and I would like to digitally archive my database of reviewed movies. Each movie review contains the movie name, type of movie, rating of the movie (1-5 stars), and release date in year. Create a program that will read in a list of movies I have reviewed (file must be created first) and allow me the following options:

Search for, and display, a movie entered.

Display the list of movies ordered by name or rating

The file itself will start with the number of reviews in total, followed by each review. Structure your file like this

#of reviews name 1 type 1 Rating 1 (number only) release date 1 (number only) name 2

type 2 Rating 2 (number only) release date 2 (number only)

Since I can have as many reviews as I want, make sure you use dynamic memory to create your structure (malloc or calloc).

Use command line arguments to supply the filename. Make sure you use an array of structures! For your sorting algorithm, you should use this functionhttp://www.cplusplus.com/reference/cstdlib/qsort/

You will need to create your own comparison function, and pass that function into the qsort function. This is called a function pointer. Make sure you functionalize your program, and free your memory correctly!

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_2

Step: 3

blur-text-image_3

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

Concepts of Database Management

Authors: Philip J. Pratt, Mary Z. Last

8th edition

1285427106, 978-1285427102

More Books

Students also viewed these Databases questions