int i = 5; struct node *tmp, *tmp2, *a, *b, *c, *d; b = c = tmp = NULL; d = tmp2 = a = NULL; for(i = 0; i < 4; i++) { if(tmp == NULL) { tmp2 = tmp = create(); tmp -> value = i; tmp -> next = create(); tmp -> next -> value = i + 4; a = tmp2 -> next; tmp = tmp -> next; } else { tmp -> next = create(); tmp -> value = i; tmp -> next -> value = i + 4; if(i == 1) b = tmp -> next; else if(i == 2) c = tmp -> next; else d = tmp -> next; tmp = tmp -> next; } } tmp -> next = tmp2; tmp -> value = i; tmp = tmp -> next -> next -> next;