主题:必解
#include <stdio.h>
int f(int a,int b)
{
int c;
if (a > b)
{
c = 1;
}
else if (a == b)
{
c = 0;
}
else
{
c = -1;
}
return 0;
}
int main(void)
{
int i = 2;
int p = 0;
p = f (i, ++i);
printf ("%d\n",p);
return 0; ///为什么p=0阿? 还有如果我把f函数的renturn 0去掉又为什么是3呢!??谢谢
}
int f(int a,int b)
{
int c;
if (a > b)
{
c = 1;
}
else if (a == b)
{
c = 0;
}
else
{
c = -1;
}
return 0;
}
int main(void)
{
int i = 2;
int p = 0;
p = f (i, ++i);
printf ("%d\n",p);
return 0; ///为什么p=0阿? 还有如果我把f函数的renturn 0去掉又为什么是3呢!??谢谢
}