I think that’s covered. I usually try to get people to diagram memory in boxes, so hopefully they’ll see the boxes are different sizes and comprehend the dangers of truncation.
I wouldn’t worry about registers. They’re not relevant to understanding how a C program operates. The abstract machine in the C standard is a little vague, so modeling your program as a concrete machine with a stack and a heap is a useful clarification, but I would always study a program’s behavior in the context of a pure memory architecture.
Very weird and unnecessary complicated way. What about
Not to mention values can be in registers (and they may not be of the same size).
I think that’s covered. I usually try to get people to diagram memory in boxes, so hopefully they’ll see the boxes are different sizes and comprehend the dangers of truncation.
I wouldn’t worry about registers. They’re not relevant to understanding how a C program operates. The abstract machine in the C standard is a little vague, so modeling your program as a concrete machine with a stack and a heap is a useful clarification, but I would always study a program’s behavior in the context of a pure memory architecture.