1.编译生成的可执行程序,例如:gcc-Whello.c-ohello
2.执行生成的可执行程序,例如:chmod+xhello;./hello
3.编写源码:
#include
intmain()
{
printf("hellolinux\r\n");
return0;
}
扩展信息
在linux虚拟机中使用c语言编译并输出“Helloworld”
#include
intmain()
{
printf("Helloworld!/n");
return0;
}
上一篇:虚拟机终端怎么运行代码
下一篇:虚拟机怎么运行程序代码