70.3k views
0 votes
Assume you have an integer pointer variable named intpoint2. It contains the address 1e6f24. You execute intpoint2++. What does intpoint2 now contain?

a)1e6f24

b)1e6f25

c)1e6f28

d)1e6f2c

User Niels
by
5.9k points

1 Answer

3 votes

Answer:

c)1e6f28

Step-by-step explanation:

The integer pointer intpoint2 points to the address 1e6f24.On increasing the inpoint.The intpoint will point to next location and since we know that the memory taken by integers is 4bytes.So the pointer will move to the next location 4 bytes ahead.

1e6f24+4=1e6f28.

Hence the answer is option c.

User Quak
by
5.2k points