我如何在另一个环境下执行c程序

问题描述 投票:-1回答:1

如何在另一个程序下执行c程序。假设您有一个C代码(程序),并且您想调用另一个。因为您想向其发送输入,然后通过比较另一个预期的返回数据来对返回的数据进行评分。

try.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系统下

c c89
1个回答
3
投票
© www.soinside.com 2019 - 2024. All rights reserved.