In the following function the return type of insertAtHead is void but we are changing head (which is not global) then why we not returning head value? And return tye should be node *
void insertAtHead(node* head, int data){
node *temp = new node(data);
temp->next = head;
head = temp;
}
int main(){
node* head = NULL;
return 0;
}