在linux系統下運行c語言程序

須要安裝一個linux的系統 1.首先在主目錄/主文件夾下創建一個 hello.c的文檔 源文件: #include<stdio.h> int main() { printf("hello!world!"); return 0; } 2.在桌面點擊打開終端,輸入 gcc -o hello hello.c   這時主目錄文件下會生成一個hello的文件 3.終端輸入  ./hello 便可運行此程序
相關文章
相關標籤/搜索