4,436
社区成员
发帖
与我相关
我的任务
分享
#include<stdio.h>
int main()
{
int a=3,b=2;
printf("a+b=%d\n",a+b);
return 0;
}
#include<stdio.h>
int main()
{
int a=3,b=2;
printf("a-b=%d\n",a-b);
return 0;
}
#include<stdio.h>
#include<unistd.h>
int main()
{
int pid = fork();
if(pid < 0 )
{
printf("make process error!");
return 0;
}
if(pid == 0 )
{
printf("child process running , minus sucessed!");
execl("minus",NULL); //输出a-b=1;
}
else
{
printf("father process running , add sucessed!\n");
execl("add",NULL);//输出a+b=5;
}
return 0;
}
#include<stdio.h>
int main()
{
int a=3,b=2;
printf("a-b=%d\n",a-b);
return 0;
}