Upload your study docs or become a
Course Hero member to access this document
Unformatted text preview: struct software *nn = (struct software*) malloc(sizeof(struct software)); struct software *temp = *q; nn->link = NULL; nn->memory = num; strcpy(nn->name, sname); if(!(*q)){ *q = nn; return; } while(temp->link){ temp = temp->link; } temp->link = nn; } void display ( struct software *q ) { if(!q){ printf("Software list is empty\n"); return; } printf("Software list:\n"); int i = 1; while(q){ printf("%d) %s %d\n",i++,q->name,q->memory); q = q->link; } } void findmin ( struct software *q ) { if(!q){ printf("Software list is empty\n"); return; } int min_ = 9999; char temp[15]; while(q){ if(q->memory < min_){ strcpy(temp,q->name); min_ = q->memory; } q = q->link; } printf("Minimum memory Software is:\n%s %d\n",temp,min_); }...
View
Full Document