In this, we are going to display Student Record using array of Structures with help of C Programming Language.
Â
#include <stdio.h>
struct student
{
char name[20];
int rollno;
float marks;
} s[5];
int main()
{
for (int i = 0; i < 5; i++)
{
printf("Enter Name: ");
scanf("%s", &s[i].name);
printf("Enter Roll-no: ");
scanf("%d", &s[i].rollno);
printf("Enter Marks: ");
scanf("%f", &s[i].marks);
printf("\n");
}
for (int i = 0; i < 5; i++)
{
printf("%s's Roll-No is %d and marks is %f\n", s[i].name, s[i].rollno, s[i].marks);
}
return 0;
}
//........coded by JAIDEEP JAMBHALE
#ENJOY CODING
Post a Comment
FOR ANY DOUBTS AND ERRORS FEEL FREE TO ASK. YOUR DOUBTS WILL BE ADDRESSED ASAP