Ok so I'v been told already how to do this question in another thread which got troll bombed. All I'm asking for is the answer so that I can work out the cinks in my head. Thanks.
b) If a program contains the main function
Code:
void main()
{ int X=2, Y=11;
func(X,&Y);
printf("%d %d\n",X,Y);
}
and another function
Code:
void func(int P, int *Q)
{ int X;
X=(*Q);
P=X/3;
(*Q)=P+1;
}
what two values will the main function print out?
P.s. This is not a homework question, I'm doing revision so don't think I'm trying to get out of learning.