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