如何在另一个下执行 ac 程序。假设你有一个 c 代码(程序),并且你想调用另一个。因为您想向它发送输入,然后通过比较另一个预期返回数据来对其返回数据进行评分。
尝试.c
int main(void) {
for (i = 0; i < MAX; ++i) {
/* call another program ( namely, try2.c ) to give it a single input,
then measure its returning data /*
}
return 0;
}
try2.c 驻留在另一个文件中。
编译器是gcc,系统linux下