




Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Introduction to computer science. Handout of Programming paradigms. Memory - Prof. Cain - Stanford University
Typology: Study notes
1 / 8
This page cannot be seen from the preview
Don't miss anything!





truct
char *name;char su
id[8]
int numUn
its; ; friends[
[0].name = f
riends
[2].su
id + 3
[5].num Uni
ts = 21
friends[
].sui d,^ "4041554"
friends->name, "T
iger Woods")
(char *
) &friends[
].num Uni
ts,^ (cons
t char
*) &f riends[
].numUni
ts);
truct{ char *name;char su
id[8]
int numUn
its; ; friends[
[0].name = f
riends
[2].su
id + 3
[5].num Uni
ts = 21
friends[
].sui d,^ "4041554"
friends->name, "T
iger Woods")
(char *
) &friends[
].num Uni
ts,^ (cons
t char
*) &f riends[
].numUni
ts);
truct{ char *name;char su
id[8]
int numUn
its; ; friends[
[0].name = f
riends
[2].su
id + 3
[5].num Uni
ts = 21
friends[
].sui d,^ "4041554"
friends->name, "T
iger Woods")
(char *
) &friends[
].num Uni
ts,^ (cons
t char
*) &f riends[
].numUni
ts);
truct{ char *name;char su
id[8]
int numUn
its; ; friends[
[0].name = f
riends
[2].su
id + 3
[5].num Uni
ts = 21
friends[
].sui d,^ "4041554"
friends->name, "T
iger Woods")
(char *
) &friends[
].num Uni
ts,^ (cons
t char
*) &f riends[
].numUni
ts);
truct{ char *name;char su
id[8]
int numUn
its; ; friends[
[0].name = f
riends
[2].su
id + 3
[5].num Uni
ts = 21
friends[
].sui d,^ "4041554"
friends->name, "T
iger Woods")
(char *
) &friends[
].num Uni
ts,^ (cons
t char
*) &f riends[
].numUni
ts);
i^ g
e^
r
o^ o
d^ s
o^ o
d^ s
typedef s
truct{ char *name;char su
id[8]
int numUn
its;
} student
student
friends[
friends
[0].name = f
riends
[2].su
id + 3
friends
[5].num Uni
ts = 21
strcpy(
friends[
].sui d,^ "4041554"
strcpy(
friends->name, "T
iger Woods")
strcpy(
(char *
) &friends[
].num Uni
ts,^ (cons
t char
*) &f riends[
].numUni
ts);
*(char *
((frac
tion *
)friends)
[3].denom)) = &fr
iends
[0].name + 1
i^ g
e^
r
o^ o
d^ s
o^ o
d^ s
typedef s
truct
int num;int denom; }frac
tion;