Hmm.... really?
Code:
Node *insertNode(Node*head,int value){
Node*newNode=(Node*)malloc(sizeof(Node));
You are still casting malloc() and you still aren't checking malloc() for NULL;
Code:
void printList(Node*head){
Node*temp=head;
while(temp){
printf("%d " , temp->value);
temp=temp->link;
}
}
You forgot to insert a newline. This leads to undefined behavior. Including but not limited to printf() not printing. I'm pretty sure
while(temp) should be while(temp !=NULL). Zero and NULL are not the same thing.
Skipping down to main()
It should be
int main(void)
This doesn't seem right. Okay. I need to cut this short. My mom need her computer again.
Yeah, you also forgot to return zero in main.