U can store all student related info here.
Code:
struct student_info {
int rollno;
char name[30];
/* Other required fields*/
};
All passwords & username fields stay here
Code:
struct authentication {
char username[10],password[10];
int category; /* 0 = student,1=teacher,2=guest */
};
Once user gets login then call display function with rollno & category,
Code:
void display(int rollno,int category) {
/* here u can write conditions for viewing i.e. if user is student then he will see only his data */
for(x = 0; x < 13; x++) {
if(rollno == user[x].rollno) { /* display all structure fields */
}
}
/* And so on for other categories */
}
if we consider the database is sorted according to roll no then u can acquire data in single shot just by indexing array with key as rollno
Thanks & Regards
Vinit