#include<stdio.h>
#define STR_SIZE 50
typedef struct
{
char name [STR_SIZE];
char course [STR_SIZE];
char phone [STR_SIZE];
char address [STR_SIZE];
} Student;
int main(){
Student students[10] = {
{ "Karl" , "Economics" , "123-456-7890" , "1234 N Platte" } ,
{ "Bill" , "Government" , "234-567-8901" , "5243 E Perry" } ,
{ "Will" , "Psychology" , "345-678-9012" , "1734 S Prue" } ,
{ "Fred" , "Philosophy" , "456-789-0123" , "9239 W Pawn" } ,
{ "Jill" , "Engineering" , "567-890-1234" , "4254 N Pike" } ,
{ "Jane" , "Mathematics" , "678-901-2345" , "1337 E Pruitt" } ,
{ "Mark" , "Language" , "789-012-3456" , "1661 S Prague" } ,
{ "Bert" , "Business" , "890-123-4567" , "8761 W Pine" } ,
{ "Zack" , "Biology" , "901-234-5678" , "8971 N Plough" } ,
{ "Anna" , "Chemistry" , "012-345-6789" , "5168 E Plume" }
};
int num_of_students = sizeof(students) / sizeof(Student) , i;
for( i=0 ; i<num_of_students ; ++i )
{
printf( "%s is taking %s\n" , students[i].name , students[i].course );
printf( " They can be reached by phone at %s\n" , students[i].phone );
printf( " Or at the address %s\n\n" , students[i].address );
}
return 0;
}