Dynamic memory allocation: review
Dept. of CSE, IIT KGP
typedefstruct{
inthiTemp;intloTemp;double precip;
} WeatherData;intmain () {intnumdays;WeatherData* days;scanf(“%d”, &numdays) ;days=(WeatherData*)malloc(sizeof(WeatherData)*numdays);if (days == NULL) printf(“Insufficient memory”);...free (days);}