Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- struct List * newList(int n, int initialValue)
- {
- struct List *head; /*after: head = randomnaya yoban'*/
- struct List *current = head; /*after: current = randomnaya eban'*/
- for (int i = 0; i < n; i++)
- {
- current = (struct List*)malloc(sizeof(struct List));
- current->index = i;
- current->value = initialValue;
- current = current->nextNode;
- }
- current = NULL;
- return head; /*return head = randomnaya eban'*/
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement