Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Project 5 v.03
//gcc 5.4.0 #include <stdio.h> #include <string.h> typedef struct{ char firstname[20]; char lastname[20]; }name; typedef struct{ int student_ID; name studentname; char Grade; char Major[10]; }record; int main(void) { record records[10]; records[0].student_ID=1001; strcpy(records[0].studentname.firstname,"Clock"); strcpy(records[0].studentname.lastname,"Explosion"); strcpy(records[0].Grade,"A"); strcpy(records[0].Major,"CS"); records[1].student_ID=1002; strcpy(records[1].studentname.firstname,"Van"); strcpy(records[1].studentname.lastname,"Gogh"); strcpy(records[1].Grade,"C"); strcpy(records[1].Major,"EE"); records[2].student_ID=1003; strcpy(records[2].studentname.firstname,"Paul"); strcpy(records[2].studentname.lastname,"Michelangelo"); strcpy(records[2].Grade,"B"); strcpy(records[2].Major,"Stat"); records[3].student_ID=1004; strcpy(records[3].studentname.firstname,"Salvador"); strcpy(records[3].studentname.lastname,"Dali"); strcpy(records[3].Grade,"D"); strcpy(records[3].Major,"Eco"); records[4].student_ID=1005; strcpy(records[4].studentname.firstname,"William"); strcpy(records[4].studentname.lastname,"Joe"); strcpy(records[4].Grade,"B"); strcpy(records[4].Major,"Eco"); records[5].student_ID=1006; strcpy(records[5].studentname.firstname,"Mary"); strcpy(records[5].studentname.lastname,"Raphael"); strcpy(records[5].Grade,"C"); strcpy(records[5].Major,"Math"); records[6].student_ID=1007; strcpy(records[6].studentname.firstname,"John"); strcpy(records[6].studentname.lastname,"Scher"); strcpy(records[6].Grade,"A"); strcpy(records[6].Major,"Mec"); records[7].student_ID=1008; strcpy(records[7].studentname.firstname,"Rahul"); strcpy(records[7].studentname.lastname,"Patel"); strcpy(records[7].Grade,"B"); strcpy(records[7].Major,"Eco"); records[8].student_ID=1009; strcpy(records[8].studentname.firstname,"Claude"); strcpy(records[8].studentname.lastname,"Monet"); strcpy(records[8].Grade,"C"); strcpy(records[8].Major,"CS"); records[9].student_ID=1010; strcpy(records[9].studentname.firstname,"Gustav"); strcpy(records[9].studentname.lastname,"Klimt"); strcpy(records[9].Grade,"A"); strcpy(records[9].Major,"CS"); }
run
|
edit
|
history
|
help
0
Sunday assignment calculator
hw 2
ordenarcifrademenosamas
factorial using function in c
e
Calculate Area of Circle
Tree
Array Sum
pseudo hw v1
If Statement/ Decrements V2