Pointer Arithmetic Problem

Hello Paul and thank you for explaining that so well. I appreciate your time.

I corrected the code according to your advice and the result is excellent.
Here are the key lines corrected:

Code:

// this goes into the first slot for the 5 integers. Each slot is said to
be
// 4 bytes wide, but we can't rely on that, so we use sizeof
*ptr_one = 78;
*(ptr_one + sizeof(int)*1) = 94; // this goes into the second slot
*(ptr_one + sizeof(int)*2) = 22; // this goes into the third slot
*(ptr_one + sizeof(int)*3) = 56; // this goes into the fourth slot

// this goes into the first slot for the 10 characters. Each slot is said
to be
// 4 bytes wide, but we can't rely on that, so we use sizeof
*ptr_two = 'A';
*(ptr_two + sizeof(char)*1) = 'B'; // this goes into the second slot
*(ptr_two + sizeof(char)*2) = 'C'; // this goes into the third slot
*(ptr_two + sizeof(char)*3) = 'D'; // this goes into the fourth slot