//Comparison operation on structure variables
#include<stdio.h>
#include<string.h>
struct student
{
char name[20];
int rollno;
float marks;
}s1,s2;
int main()
{
strcpy(s1.name,"ABCD");
s1.rollno=1;
s1.marks=78.88;
s2=s1;
printf("Name=%s\nRollNo=%d\nMarks=%f",s1.name,
s1.rollno,s1.marks);
printf("\n");
printf("Name=%s\nRollNo=%d\nMarks=%f\n",s2.name,
s2.rollno,s2.marks);
printf("Comparing the structures : \nName = %d\tRollno = %d\tMarks = %d\t",s1.name==s2.name,s1.rollno==s2.rollno,s1.marks==s2.marks);
return 0;
}

Embed on website

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