I couldn't figure out how to do it with multiple students. For example, for 6 students how can i organize my struct?
struct student 0
....
....
....struct student 1
....
....
....
.
.
.
struct student 5
....
....
....That's why I used struct variable inside for loop. I know it is so amateur but i could not figure out how to get what I desire.
If you want an array of structures then define your variable like this:
struct student i[6];
Here's a link on structures in C
http://www.exforsys.com/tutorials/c-language/c-structures-and-unions.html