求解,代码运行结果是a=4,b=2,c=8,p=9;
为什么c=8,不应该等于1吗?
为什么p=9,不应该等于5吗?
#include <stdio.h>
int c, a = 4;
int func1(int a, int b);
int main()
{ //断点①
int b = 2, p = 0;
c = 1;
p = func1(b, a); //断点②
printf("a=%d, b=%d, c=%d, p=%d\n", a, b, c, p); //断点⑤
return 0;
}
int func1(int a, int b)
{
c = a * b; //断点③
a = b - 1;
b++;
return (a + b + 1); //断点④
}