Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- struct Node {
- int data;
- struct Node* next;
- struct Node* prev;
- };
- struct Node* head; // global variable - pointer to head node.
- struct Node* GetNewNode(int x) {
- struct Node* newNode
- = (struct Node*)malloc(sizeof(struct Node));
- newNode->data = x;
- newNode->prev = NULL;
- newNode->next = NULL;
- return newNode;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement