C语言,可以调用一个函数的返回值到另一个函数中吗?

2025-03-18 01:46:13
推荐回答(3个)
回答1:

你是像这样吗

#include
int f1(int x)
{
return x+10;
}
int f2(int x)
{
x=f1(x);
return x;
}
int main()
{<丹龚草夹禺蝗碴伟厂连br /> int a=10;
printf("%d\n",f2(a));
return 0;
}

不是很明白你的意思

回答2:

当然你如果要求你的函数有返回值的话,就必须用return返回结果

回答3:

3(1,2);