Hello, I'm slightly confused with the concept of Hexadecimal. It is assumed that the addresses of the variables i, j and the first element of the integer array num in hexadecimal are 22FF6C, 22FF68, 22FF40 respectively.
Code:
int i, j = 3;
int *pi = &i, *pj = &j;
int num[5]={25, -1, 3, 12, 100};
printf("%x, %x, %x\n", &i, &j, num);
printf("%x, %x\n", pi, pj);
j++;
*pj *= 3;
printf("%x, %d\n", pj, *pj);
pi = num;
num[0] += 5;
printf("%x, %d\n", pi, *pi);
printf("%x, %d\n", pi+j, *pi+j);
How does the output change from 22FF40 to 22FF70? I don't understand that part. Could someone explain. Thanks in advance, Air.