美文网首页
python中运行c程序

python中运行c程序

作者: python_spider | 来源:发表于2018-01-19 07:18 被阅读48次

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文件


执行结果

相关文章

网友评论

      本文标题:python中运行c程序

      本文链接:https://www.haomeiwen.com/subject/tmonoxtx.html