#include <stdio.
h> // Function to display the linked list
#include <stdlib.h> void display(struct Node* head) {
struct Node* current = head;
// Node structure while (current != NULL) {
struct Node { printf("%d -> ", current->data);
int data; current = current->next;
struct Node* next; }
}; printf("NULL\n");
}
// Function to create a new node
struct Node* createNode(int value) { // Main function
struct Node* newNode = (struct int main() {
Node*)malloc(sizeof(struct Node)); struct Node* head = NULL; // Initialize an empty list
newNode->data = value;
newNode->next = NULL; // Insert elements
return newNode; insert(&head, 10);
} insert(&head, 20);
// Function to insert a node at the beginning insert(&head, 30);
void insert(struct Node** head, int value) {
struct Node* newNode = createNode(value); // Display the linked list
newNode->next = *head; printf("Linked List: ");
*head = newNode; display(head);
} return 0;
}