<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ThinkChat2.0新版上線,更智能更精彩,支持會話、畫圖、視頻、閱讀、搜索等,送10W Token,即刻開啟你的AI之旅 廣告
                # 如何安裝 Turbo C++:編譯并運行 C 程序 > 原文: [https://beginnersbook.com/2014/01/install-turbo-c/](https://beginnersbook.com/2014/01/install-turbo-c/) 您需要了解的第一件事是計算機(機器)只能理解機器語言(0 和 1 流)。為了將您的 C 程序源代碼轉換為機器代碼,您需要編譯它。編譯器是將源代碼轉換為機器代碼的東西。簡單來說,您可以說編譯器將人類可讀代碼轉換為機器可讀格式。 ## 安裝 Turbo C++:分步指南 **下載鏈接**:[下載適用于 Windows 的 Turbo C++](https://download.cnet.com/TurboC-for-Windows/3000-2212_4-75786077.html) **步驟 1**:找到`TC.exe`文件并將其打開。你會在位置`C:\TC\BIN\`找到它。 **步驟 2**:文件 -&gt; 新建(如上圖所示)然后編寫 C 程序 ```c #include<stdio.h> int main() { printf("hello World!"); return 0; } ``` ![first-C-program](https://img.kancloud.cn/4c/9a/4c9a60a192ee6206ae7b8b99205babe6_642x275.jpg) **步驟 3**:使用`F2`(或者文件 -&gt; 保存)保存程序,記住擴展名應為`.c`。在下面的屏幕截圖中,我將它命名為`helloworld.c`。 ![save C program](https://img.kancloud.cn/bd/2d/bd2db2b2a748fe4b05b569834e12c5a1_642x354.jpg) **步驟 4**:使用`Alt + F9`**或**編譯 -&gt; 編譯程序。編譯(如下面的屏幕截圖所示)。 ![compile C program](https://img.kancloud.cn/78/37/78376661becb7491e2e1f3ac2cb07ac7_640x275.jpg) **步驟 5**:按`Ctrl + F9`運行(或在菜單欄中選擇運行 -&gt; 運行)C 程序。 ![run C program](https://img.kancloud.cn/9a/b2/9ab20e00d058bd7ba5aa3ccf2a7b5e96_643x275.jpg) **步驟 6** :`Alt + F5`查看輸出到屏幕上的程序輸出。 ![output](https://img.kancloud.cn/ef/0a/ef0aabcb3370bef0af4e23e7371c4010_640x103.jpg) ## 使用 gcc 編譯器編譯和運行 C 程序 我們已經看到了使用 Turbo C++ 編譯和執行 C 程序的步驟。我們也可以使用 gcc 編譯器來做同樣的事情。步驟如下: **源代碼** `Helloworld.c`(文件應始終以`.c`擴展名保存) ```c # include<stdio.h> int main() { puts ("hello World"); return 0; } ``` **編譯它**(它基本上是將`helloworld.c`文件轉換為`helloworld`文件) ```c >gcc helloworld.c –o helloworld > ``` 如果您在 Windows 上編譯,生成的文件將是`helloworld.exe`。 **運行已編譯的程序** 一旦你給出了上面的命令,如果你在 Windows 上就會創建一個`.exe`文件,然后輸入以下命令來運行源代碼。 **適用于 Windows** ```c >helloworld ``` **適用于 Mac 和 Linux 操作系統** ```c >./helloworld ``` gcc 編譯器采用人類可讀格式(`helloworld.c`文件)并轉換為 Windows,Linux 和 Mac OS X 的機器代碼。
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看