10.02.c.   Show exactly how and where mystring would be stored?

 

We know that the base address of mystring is 4078 (Given).

We also know the string has been initialized as “Hi” (Given).

 

We also know (from previous sections) that:

 

            ‘H’ = ASCII 71 (‘A’ is ASCII 65) = 010000012

            i’ = ASCII 105 (‘a’ is ASCII 97) = 011000012

 

We also know that the string must be terminated by the Null Character (’\0’) = 010 = 000000002

 

Therefore, looking at RAM we see:

 

4078

4079

4080

4081

01000001

01100001

00000000