A03/sorted_snackbar.c
// Delete (e.g. free) all nodes in the given list of snacks
// Param snacks: the first node in the list (NULL if empty)
Delete  all nodes in the given list of snacks
Param snacks: the first node in the list (NULL if empty)
Delete all nodes in the given list of snacks Param snacks : the first node in the list ( NULL if empty )
void clear(struct snack* snacks) {
	struct snack* current = snacks;
	struct snack* delete = snacks;
	while (current != NULL) {
		current = current->next;
		free(delete);
		delete = current;
	}
}
void clear ( struct snack * snacks ) { struct snack * current = snacks ; struct snack * delete = snacks ; while ( current != NULL ) { current = current -> next ; free ( delete ) ; delete = current ; } }
Delete (e.g.
Delete ( e . g .