P189. Program to store 1 student database which contains 3 information ( rollno – name – marks )
#include<stdio.h>
struct
stu
{
int roll;
char name[10];
float t_marks;
};
void
main()
{
struct stu v;
printf("Enter roll number : ");
scanf("%d",&v.roll);
printf("Enter name : ");
scanf(" %s",v.name);
printf("Enter total marks : ");
scanf("%f",&v.t_marks);
printf("%d %s %f
",v.roll,v.name,v.t_marks);
}
Comments
Post a Comment