181k views
3 votes
What does the following code print?

#include void func(int x, int *yPtr, int *zPtr) { *yPtr += 3; *zPtr += 4; x += 5; } int main() { int a, *bPtr, c; a = 5; bPtr = &a; c = *bPtr; *bPtr += 2; c += 3; func(c, bPtr, &c); printf("%d\\", a + *bPtr + c); return 0; }
a. 32
b. 36
c. 51
d. 30
e. none of above

User Mkln
by
7.5k points

1 Answer

4 votes

Answer:

a. 32

Step-by-step explanation:

Form the above code

{ *yPtr +=3 ;

*zPtr,

c+=3;

func(c,bPTR,&c);

the a=*bPtr c

return value 32 after execution

User Lance Johnson
by
8.0k points