#include #include #include typedef struct ListNode { int data; struct ListNode *next; } ListNode; int main() { printf("Hello World!\n"); struct ListNode *head = NULL; for (int i = 0; i < 5; i++) { struct ListNode *temp = (struct ListNode *) malloc (sizeof(struct ListNode)); temp->data = i; temp->next = head; head = temp; } struct ListNode *p = head; while(p != NULL) { printf("node - %d\n",p->data); p = p->next; } //free the space }