Advertisement
Guest User

Untitled

a guest
May 29th, 2015
249
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. struct Node {
  2. int data;
  3. struct Node* next;
  4. struct Node* prev;
  5. };
  6.  
  7. struct Node* head; // global variable - pointer to head node.
  8.  
  9.  
  10. struct Node* GetNewNode(int x) {
  11. struct Node* newNode
  12. = (struct Node*)malloc(sizeof(struct Node));
  13. newNode->data = x;
  14. newNode->prev = NULL;
  15. newNode->next = NULL;
  16. return newNode;
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement