Docsity

Memory - Programming Paradigms - Prof. Cain, Study notes of Programming Paradigms

Partial preview of the text

Download Memory - Programming Paradigms - Prof. Cain and more Study notes Programming Paradigms in PDF only on Docsity!

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);

\

T

i^ g

e^

r

W^

o^ o

d^ s

\

W^

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

\

T

i^ g

e^

r

W^

o^ o

d^ s

\

W^

o^ o

d^ s

\

typedef s

truct

int num;int denom; }frac

tion;