RUPAK SEARCH ENGINE

Custom Search

Initialize or store roll, name and two subjects' marks of a student in a structure and display it.

Initialize or store roll, name and two subjects' marks of a student in a structure and display it.
#include
#include
void main()
{
struct mydatatype{
int roll;
char sname[20];
int comp,eng;
};
struct mydatatype student = { 1,"Ram",24,23 };
clrscr();
printf("\nYour information\n\n");
printf("\nRoll %d",student.roll);
printf("\nName %s",student.sname);
printf("\nComputer %d",student.comp);
printf("\nEnglish %d",student.eng);
getch();
}

No comments:

Post a Comment