Question: Need help with this in C programming code explanation would be great.Thank you C programming code #define MAX_LEN 80 typedef struct {char *title; int duration;}
Need help with this in C programming code explanation would be great.Thank you
C programming code #define MAX_LEN 80 typedef struct {char *title; int duration;} Song typedef struct {Song* all_songs;/* array of songs*/int number_of_songs; char album_name [MAX_LEN + 1];} Album a. Given two Song structures s1 and s2, are there any problems with assigning one structure to another? Is deep copying taking place during the assignment of these two structures? b. Define a function that initializes a song using a duration and a string provided. The function will make a copy of the string parameter. c. Define a function that will initialize an Album structure based on an array of Songs provided as parameter. The function will create a dynamically-allocated array of Songs and will initialize each entry with a copy of the corresponding song in the parameter array. Feel free to add to the function any parameters you understand are needed
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
