You know, I don't think that you actually allocate memory for head at any point.
I'm not criticizing you, I'm just going to point out that this is a firly obtuse way of doing this, since returning a pointer to the node would be the technically right way. (Yea yea, I know, it's a riddle).
Is this what you're looking for?
Code:
void NewNode(struct node ** newnode)
{
* newnode = malloc(sizeof(node));
(* newnodeinstance)->value = 0;
(* newnodeinstance)->next=NULL;
}
void main()
{
struct node *head; // No reason to believe head != NULL...
int i=0;
NewNode(&head); // We can change head to a usefull value
// by passing it's address.
head->value=100; // Dunno if it'll work.
}