Read without ads and support Scribd by becoming a Scribd Premium Reader.
 
Dept. of CSE, IIT KGP
Linked Lists
CS10001:Programming & Data Structures
Sudeshna Sarkar
Dept. of Computer Sc. & Engg.,Indian Institute of TechnologyKharagpur
 
Arrays: pluses and minuses
Dept. of CSE, IIT KGP
+ Fast element access.--Impossible to resize.
Many applications require resizing!
Required size not always immediately available.
 
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);}
Search History:
Searching...
Result 00 of 00
00 results for result for
  • p.
  • Notes
    Load more