Question: WRITE A PROGRAM TO FIND INFORMATION OF MOVIES BY SEARCHING MOVIE NAMES WITH A KEYWORD. SHOW THE EXECUTION TIME.
This can be done in C, C++, or Python.
The information in the file is in ASCII and needs to be converted to UTF-8.
The title IDs are the values that start with "tt". The year is in ASCII format. Here are some of the values in the file:
ÃŒg tt0000014 The Sprinkler Sprinkled
ÃŒg tt0000015 Autour d'une cabine
ÃŒf tt0000016 Barque sortant du port
ÃŒg tt0000017 Italienischer Bauerntanz
Ìg tt0000018 Das boxende Känguruh
ÃŒg tt0000019 The Clown Barber
ÃŒj tt0000020 The Derby 1895
ÃŒg tt0000022 Blacksmith Scene
ÃŒg tt0000023 The Sea
ÃŒg tt0000024 Opening of the Kiel Canal
Indexing - The attached data file "out.dat" is a file that stores a table of movie information. Its schema is described as follows:
tconst: Title ID (char(12))
name: Movie name (char(255))
year: Release year (int)
Each row is stored in a block that has 12+255+4 bytes of data. You can use the following C structure to present one block/row of data:
typedef struct title {
char tconst[12];
char name[255];
int year;
} Title.