#include
int a=4,c=3;
main( )
{
void f1( );
int a=5,b=2;
b=a+c;
a=a+c;
c=a+1;
f1(a,b);
printf("%d,%d,%d\n",a,b,c);
}
void f1(int a,int b)
{
int c=3;
a=a+c;
c=a+b;
printf("%d,%d,%d\n",a,b,c);
}
麻烦大家打一下 老师讲课的时候没怎么听懂 谢谢各位了
你第一行的include 没写全
你的程序可以编译运行,没有问题。如果结果不是你期望的,你得说清楚你的程序想干嘛。
另外,你的函数参数有a,又有全局变量a。这种写法合法,但是很让人迷惑,请注意。