I'm quite new to C and programming in general.
I did a bubble sort on a linked list so node with the highest int should be the last one.
I would like to know if its possible to only print the
name(char [20])
of the last node?
Here's what I've got so far:
void display(albumlist *head) {
albumlist *current = head;
if(head == NULL) {
printf("error\n");
return;
}
while(current != NULL) {
printf("%s ", current->name);
}
printf("\n");
}