#include<stdio.h>
#include<conio.h>
#define N 10
union student{
int rollno;
char name[20];
char gender;
float fees;
};
void main(){
int i;
union student s[N];
for(i=0; i<N; i++){
clrscr();
printf("enter %d student name\n",i+1);
gets(s[i].name);
getch();
}
for(i=0; i<N; i++){
clrscr();
printf("Name of %d student =%s\n",i+1,s[i].name);
getch();
}
}
No comments:
Post a Comment