why is the struct node* current declared and pass the head pointer? Could we just use the struct node* head to walk through the list?Code:// Return the number of nodes in a list (while-loop version)
int Length(struct node* head) {
int count = 0;
struct node* current = head;
while (current != NULL) {
count++;
current = current->next
}
return(count);
}