c语言怎么调用外部exe文件

用c语言怎么打开外部exe文件 不是c++中是纯c


system("命令字符串");
或 system(已给定命令内容的字符变量);

例如:
#include <stdio.h>
#include <stdlib.h>
void main()
{
char st[32]="a.exe"; // 已给定命令内容的字符变量

system("type a.c"); // 命令字符串,运行DOS命令TYPE
printf("I am running a.exe now!");
system(st); // 运行外部a.exe文件
}
温馨提示:答案为网友推荐,仅供参考