struct node *func2(int val) { int i = 0; struct node *tmp, *tmp2; tmp2 = create(); tmp = tmp2; tmp -> value = val; while (i < val) { tmp -> next = create(); tmp -> next -> value = i; tmp = tmp -> next; i++; } return(tmp2); }