#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="shobhit";
strcpy(s1.name,"shobhit");
printf("student name=%s\n",s1.name);
printf("student roll no=%d\n",s1.roll);
printf("student cgpa=%f\n",s1.cgpa);
struct student s2;
s1.roll=1660;
s1.cgpa=8.7;
//s1.name="raj";
strcpy(s2.name,"raj");
printf("student name=%s\n",s2.name);
printf("student roll no=%d\n",s2.roll);
printf("student cgpa=%f\n",s2.cgpa);
struct student s3;
s1.roll=1665;
s1.cgpa=7.8;
//s1.name="sam";
strcpy(s3.name,"sam");
printf("student name=%s\n",s3.name);
printf("student roll no=%d\n",s3.roll);
printf("student cgpa=%f\n",s3.cgpa);
return 0;
}
To embed this program on your website, copy the following code and paste it into your website's HTML: