0

I am wondering why the linked list is still the same after calling this function. The head address is not reassigned to head -> next? Is this call by reference since a pointer variable is passed to the function?

typedef struct list{int data; struct list *next;} list;
void iterate_test(list* h)
    {h = h -> next;}`
Ethan
  • 25
  • 1
  • 6

0 Answers0