在c语言中主函数如何调用子函数

如题所述

#include <stdio.h>
#include <stdlib.h>

int test1(int a)
{
printf("a=%d\n",a);
return 0
}
int main()
{
int a=1;
test1(a); /*这样调用即可,使用函数名再加上参数就OK*/
return 0;
}
温馨提示:内容为网友见解,仅供参考
无其他回答
相似回答