Both can be used, Although first is considered better due to certain flexibility available inside the function to change where head will point.
In first case , you are sending a double pointer(address of head pointer) to function as argument, so you can change value of head pointer(where head is pointing) using
void test_Func(struct Node **head) //Func Definition
{
*head=sm addr;
}
test_Func(&head); //Func Call
In second case, directly changing head inside function is not possible as it's the value of head pointer itself that you are passing so you cannot access its address to change it(head is just a local var containing address pointed by head and not address of head itself) . To change it you can return new head value (an address essentially) at end and at the place of fun call reassign to head pointer.
struct Node * test_Func(struct Node *head) //Func Definition
{
head=sm addr;
return head;
}
head= test_Func(head); //Func Call