#include <stdio.h>
#include <string.h>
struct details {
char name[100];
int Rollno;
int semester_no;
float CGPA;
char school[100];
char university[100];
char place[100];
};
int main() {
struct details s1, s2;
printf("\nTHE DETAILS OF STUDENT 1 ARE...\n");
printf("Enter the name, Rollno of the student:\n");
scanf(" %[^\n]s %d", s1.name, &s1.Rollno);
printf("Enter the Semester no, details:\n");
scanf("%d", &s1.semester_no);
printf("Enter the CGPA details:\n");
scanf("%f", &s1.CGPA);
printf("Enter the name of school, university, place details:\n");
scanf(" %[^\n]s %s %s", s1.school, s1.university, s1.place);
printf("%s %d\n %d\n %.2f\n%s %s %s\n", s1.name, s1.Rollno, s1.semester_no, s1.CGPA, s1.school, s1.university, s1.place);
printf("\nTHE DETAILS OF STUDENT 2 ARE...\n");
printf("Enter the name, Rollno of the student:\n");
scanf(" %[^\n]s %d", s2.name, &s2.Rollno);
printf("Enter the Semester no, details:\n");
scanf("%d", &s2.semester_no);
printf("Enter the CGPA details:\n");
scanf("%f", &s2.CGPA);
strcpy(s2.school, s1.school);
strcpy(s2.university, s1.university);
strcpy(s2.place, s1.place);
printf("%s %d\n %d\n %.2f\n%s %s %s\n", s2.name, s2.Rollno, s2.semester_no, s2.CGPA, s1.school, s1.university, s1.place);
return 0;
}
To embed this project on your website, copy the following code and paste it into your website's HTML: