python中运行c程序

2018-01-19  本文已影响48人  python_spider

1、首先编写一个简单的c程序,如下:

  1 #include<stdio.h>
  2 int main(int argc,char **argv){
  3 
  4     printf("hello world\n");
  5     return 0;
  6 }
           

2、然后编译这个c程序


编译

如图可见,a.out文件即为1.c这个文件编译之后的可执行文件
3、执行这个 a.out文件


执行结果
上一篇 下一篇

猜你喜欢

热点阅读