#include <stdio.h>

struct p{
    char name[20]; //dataType member1
    int roll;
}; //p1,p2;

int main(){
    struct p *ptr1,*ptr2,p1,p2; // replace if needed
    
    ptr1=&p1;
    ptr2=&p2;
    
    scanf("%s",ptr1->name); // assigning the values to variables
    scanf("%d",&ptr1->roll);
    scanf("%s",ptr2->name);
    scanf("%d",&ptr2->roll);
    
    printf("%s ",ptr1->name);
    printf("%s \n",ptr2->name);
    printf("%d ",ptr1->roll);
    printf("%d",ptr2->roll);
    
}

Embed on website

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