//write a program to store data of three students using structures
#include <stdio.h>
#include<string.h>
//user defined
struct student{
    int roll;
    float cgpa;
    char name[100];
};
 
int main() {
    struct student s1;
    s1.roll=1664;
    s1.cgpa=9.2;
    // s1.name="Shradha";
    strcpy(s1.name,"shradha");
    
    printf("student name : %s\n",s1.name);
    printf("student roll  no = %d\n",s1.roll);
    printf("student cgpa = %f",s1.cgpa);
    printf("\n");
    
    struct student s2;
    s2.roll=1665;
    s2.cgpa=9.3;
    // s1.name="Shradha";
    strcpy(s2.name,"Aman");
    
    printf("student name : %s\n",s2.name);
    printf("student roll  no = %d\n",s2.roll);
    printf("student cgpa = %f",s2.cgpa);
    return 0;
}

Embed on website

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