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

                合規國際互聯網加速 OSASE為企業客戶提供高速穩定SD-WAN國際加速解決方案。 廣告
                # C 程序:創建,初始化和訪問指針變量 > 原文: [https://beginnersbook.com/2019/02/c-program-to-create-initialize-and-access-a-pointer-variable/](https://beginnersbook.com/2019/02/c-program-to-create-initialize-and-access-a-pointer-variable/) 在本教程中,我們將編寫一個 C 程序來創建,初始化和訪問指針變量。要學習指針的基礎知識,請參閱我的教程: [C 指針](https://beginnersbook.com/2014/01/c-pointers/)。 ## 示例:用于創建,訪問和初始化指針的程序 在下面的程序中,我們聲明了一個字符變量`ch`和字符指針`pCh`,之后我們用 `char ch`的地址值初始化了指針變量`pCh`。 該示例還說明了如何使用指針變量`pCh`訪問`ch`的值和地址。 ```c /* Created by Chaitanya for Beginnersbook.com * C program to create, initialize and access a pointer */ #include <stdio.h> int main() { //char variable char ch; //char pointer char *pCh; /* Initializing pointer variable with the * address of variable ch */ pCh = &ch; //Assigning value to the variable ch ch = 'A'; //access value and address of ch using variable ch printf("Value of ch: %c\n",ch); printf("Address of ch: %p\n",&ch); //access value and address of ch using pointer variable pCh printf("Value of ch: %c\n",*pCh); printf("Address of ch: %p",pCh); return 0; } ``` **輸出:** ![C program to create, initialize and access a pointer variable](https://img.kancloud.cn/8e/ab/8eabb6a89d9a5a0ae124652fb83c5c40_826x260.jpg) #### 相關 C 示例 1. [C 程序:檢查閏年](https://beginnersbook.com/2017/09/c-program-to-check-leap-year/) 2. [C 程序:交換兩個數字](https://beginnersbook.com/2017/09/c-program-to-swap-two-numbers/) 3. [C 程序:查找`int`,`float`,`double`和`char`的大小](https://beginnersbook.com/2017/09/c-program-to-find-the-size-of-int-float-double-and-char/) 4. [C 程序:查找字符的 ASCII 值](https://beginnersbook.com/2017/09/c-program-to-find-ascii-value-of-a-character/)
                  <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>

                              哎呀哎呀视频在线观看