logo CodeStepByStep logo

imdb

Related Links:
Author: Allison Obourn (on 2020/09/14)

Write a program named imdb that allows the user to search the top 250 IMDB movies for a phrase and outputs movies containing that phrase and the total number of movies that match.

Read data from the file imdb.txt. Each line of this file contains information about a different movie. The lines are in the format rank rating votes name. See example lines below:

1 9.1 196376 The Shawshank Redemption (1994)
2 9.0 139085 The Godfather: Part II (1974)
3 8.8 81507 Casablanca (1942)

Your code should displays results in the following format:

Search word? part
  
Rank    Votes   Rating  Title
2       139085  9.0     The Godfather: Part II (1974)
40      129172  8.5     The Departed (2006)
95      20401   8.2     The Apartment (1960)
192     30587   8.0     Spartacus (1960)
4 matches.
Function: Write a C function as described, not a complete program.

You must log in before you can solve this problem.

Log In

Need help?

Stuck on an exercise? Contact your TA or instructor.

If something seems wrong with our site, please

Is there a problem? Contact us.