#include <stdio.h>
#include <stdlib.h>
#include <string.h>

struct node {
    int data;
    char a[10];
    struct node* next;
};

int main() {
    struct node* a = (struct node*)malloc(sizeof(struct node));
    struct node* b = (struct node*)malloc(sizeof(struct node));
    
    a->data = 5;
    strcpy(b->a, "adarsh");
    b->next = NULL;
    
    a->next = b;
    
    struct node* tmp = a;
    
    while (tmp != NULL) {
        printf("%d ", tmp->data);
        printf("%s\n", tmp->a);
        tmp = tmp->next;
    }
    
    // Free allocated memory
    free(a);
    free(b);
    
    return 0;
}

Embed on website

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