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

                企業??AI智能體構建引擎,智能編排和調試,一鍵部署,支持知識庫和私有化部署方案 廣告
                # C 程序:使用程序存儲學生信息 > 原文: [https://www.programiz.com/c-programming/examples/structure-store-information](https://www.programiz.com/c-programming/examples/structure-store-information) #### 在此示例中,您將學習將學生的信息存儲在結構中并將其顯示在屏幕上。 要理解此示例,您應該了解以下 [C 編程](/c-programming "C tutorial")主題: * [C 結構](/c-programming/c-structures) * * * ## 存儲信息并使用結構顯示 ```c #include <stdio.h> struct student { char name[50]; int roll; float marks; } s; int main() { printf("Enter information:\n"); printf("Enter name: "); fgets(s.name, sizeof(s.name), stdin); printf("Enter roll number: "); scanf("%d", &s.roll); printf("Enter marks: "); scanf("%f", &s.marks); printf("Displaying Information:\n"); printf("Name: "); printf("%s", s.name); printf("Roll number: %d\n", s.roll); printf("Marks: %.1f\n", s.marks); return 0; } ``` **輸出** ```c Enter information: Enter name: Jack Enter roll number: 23 Enter marks: 34.5 Displaying Information: Name: Jack Roll number: 23 Marks: 34.5 ``` 在該程序中,創建了一個結構`student`。 該結構具有三個成員:`name`(字符串),`roll`(整數)和`mark`(浮點)。 然后,創建結構變量`s`來存儲信息并將其顯示在屏幕上。
                  <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>

                              哎呀哎呀视频在线观看