#include <stdio.h>
#include<stdlib.h>
struct Node {
    int data;
    struct Node *next;
};

struct Node* insertAtEnd(struct Node* head,int value){
    struct Node* newNode=(struct Node*)malloc(sizeof(struct Node));
    newNode->data =value;
    newNode->next=head;

if(head == NULL)
return newNode;

 struct Node* temp = head;
    while(temp->next != NULL) 
    temp=temp->next;
    
    temp->next=newNode;
    return head;
}
void display(struct Node* head) {
    struct Node* temp = head;
    while(temp != NULL) {
        printf("%d-> ",temp->data);
        temp = temp->next;
    }
    printf("NULL\n");
}
int main(){
    struct Node* head = NULL;
    head = insertAtEnd(head, 10);
     head = insertAtEnd(head, 20);
      head = insertAtEnd(head, 30);
       head = insertAtEnd(head, 53);
        head = insertAtEnd(head, 56);
     printf("Linked List:\n");
     display(head);
     return 0;

}