Question: I need to copy the data from the source pointer parameter into the target parameter. My code for copying the data is under the movie

I need to copy the data from the source pointer parameter into the target parameter. My code for copying the data is under the movie_copy function. My output is located at the bottom of the image and is outputted incorrectly. I am using this function to print my output:
void movie_print(const movie_struct *source){
// your code here
printf("Title: %4s
", source->title);
printf("Year: %12d
", source->year);
printf("Director: %s
", source->director);
printf("Genre: %8s
", GENRES[source->genre]);
printf("Rating: %7f
", source->rating);
}
The intended output display should look like this:
Test: movie_init(&source, "Dark City", 1998, "Alex Proyas", 0,7.8)
Test: movie_print(source):
Title: Dark City
Year: 1998
Director: Alex Proyas
Genre: science fiction
Rating: 7.8
I need to copy the data from the source pointer

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!