// Online C compiler to run C program online
#include <stdio.h>
#include <stdlib.h>

struct Node{
    int data;
    struct Node* next;
    
};

void Traversing(struct Node*ptr){
  while(ptr!=NULL){
    printf("Element :- %d\n",ptr->data);
    ptr = ptr->next;
    
  }
}

int main() {
    struct Node * head ;
    struct Node * second;
    struct Node * third;
    
    head = (struct Node*) malloc(sizeof(struct Node*));
    second = (struct Node*) malloc(sizeof(struct Node*));
    third = (struct Node*) malloc(sizeof(struct Node*));
    
    head->data=78;
    head->next = second;
     second->data=98;
    second->next = third;
     third->data=90;
    third->next = NULL;
    
    Traversing(head);
    
    // Write C code here
    printf("Try programiz.pro");

    return 0;
}

Embed on website

To embed this program on your website, copy the following code and paste it into your website's HTML: