Академический Документы
Профессиональный Документы
Культура Документы
h>
#include <stdlib.h>
#include<string.h>
typedef struct
{
char *artist = NULL;
char *title = NULL;
} songInfo;
int main(void)
{
//dynamically creating array of size 10 using malloc
songInfo *arr = (songInfo*)malloc(10 * sizeof(songInfo));
if (arr == NULL)
{
return 1;
}
strcpy((arr)->artist, artistName);
strcpy(arr->title, titleName);
//arr->artist = artistName;
//arr->title = titleName;
puts(arr->artist);//testing
puts(arr->title);
//There are no words to express how I feel about you, I'll just say Thank you
for everything & I LOVE YOU "MAA". HAPPY MOTHER'S DAY