#include <stdio.h>
#define BUFSZ 255
struct lala
{
char name[BUFSZ];
unsigned age; // for example :-)
} student[10];
int main(void)
{
for(int i=0; i < 10; i++)
scanf("%s %d", &student[i].name, &student[i].age);
// Using scanf() for reading strings is in general not a good idea.
// Look at fgets(). It is more precise and can prevent overflows.
return 0;
}
<< moderator edit: added
[code][/code] tags >>
Reputation Points: 10
Solved Threads: 1
Junior Poster in Training
Offline 62 posts
since Jun 2005