> b 0 p ?
> q[7] ? r[3] 19
> w2 ? r[-2] 14
> l 24 w ?
> x ? f 32
Those are the ones I got correct, now that is also assuming when he
said he graded lenient. I believe he said he graded upon if you got
something wrong, he tried to give as much points to figure out how you
got so and so wrong. I was under the impression for this problem you
needed to make sure everything was a multiple of 4.
0-1____4_______14__16_______22__24_______28__30__32_________
b |------| q[10] |----| our_union | w | L | w2|
----| f
So my in space memory looked like that, which was wrong but maybe some
of it was right,.. still going through this one.
On Nov 16, 10:14 pm, Addison Denenberg <
addison.denenb...@gmail.com>
wrote:
> I'm not sure how you got all the way to 32 for f but I do know that the size
> of a union equals the size of the largest element in the union, which in
> this case would be char r[6] so w should be at 17 I think. And why exactly
> does the union start at 12? I'm pretty sure thats right because I put 11 on
> the test and got it wrong but I'm not sure why. Does the first byte contain
> the length of the array?
>