#include <stdio.h>
#include <string.h>
#include <stdlib.h>
struct Node{
char *data;
struct Node *next;
int a;
};
int main() {
struct Node *a1,*a2,*a3;
a1=(struct Node*)malloc(sizeof(struct Node));
a2=(struct Node*)malloc(sizeof(struct Node));
a3=(struct Node*)malloc(sizeof(struct Node));
(*a1).data="adarsh";//-> is the shortcut for (*).
a1->a=3;
a1->next=a2;
a2->data="hii";
a2->next=a3;
a3->data="hello";
a3->next=NULL;
struct Node *temp;
temp=a1;
while(temp!=NULL){
printf("%s ",temp->data);
temp=temp->next;
}
printf("%zu",sizeof(a1));
}
To embed this program on your website, copy the following code and paste it into your website's HTML: