struct student
{
char
name[10];
int roll;
float
age;
}s;
struct
student s;
main()
{
printf("Enter
the name, rall no., and age of a student ");
scanf("%s%d%f",s.name,&s.rall,&s.age);
printf("The
name of the student is %s and his roll no. is %d and he is %f years old ", s.name,s.roll,s.age);
getch();
}
Output
Enter the name, roll
no., and age of a student amit 243 18
The name of the student is amit and his roll no.
is 243 and he is 18 years old
No comments:
Post a Comment