This time, if xyzfunc executes myint++, what happens to the copy of myint in the calling program?

a) Its address is incremented by four.

b) It is incremented by one.

c) It doesn't change.

d) It doesn't change until the function returns.

Respuesta :

Answer:

a) Its address is incremented by four.

Explanation:

In cases of pointer when we pass them to a function the copy that is created in the function points to the same memory address to which the original pointer pointed.So on increasing it's value in the function will tell the pointer to move to the next integer location that is 4 bytes ahead hence the answer is option a.

Otras preguntas