<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國際加速解決方案。 廣告
                [TOC] # 間接賦值 ~~~ void changeValue(int *p) { *p = 100; } int main() { int a = 10; changeValue(&a); printf("%d\n", a); //100 getchar(); return 0; } ~~~ # 指針做參數輸入 ~~~ #include <iostream> #include <stddef.h> #include <stdlib.h> #include <stdio.h> #include <string.h> void printString(const char *str) { printf("打印內容: %s\n", str); } void printStringArray(char **arr, int len) { //arr[0]是char *類型的 for (int i = 0; i < len; ++i) { printf("%s\n", arr[i]); } } int main() { //堆上分配內存 char * s = (char *)malloc(sizeof(char) * 100); memset(s, 0, 100); strcpy(s, "hello world"); printString(s); //棧上分配內存 char * strs[] = { "aaaaa", "bbbb", "ccc", "dddd", }; int len = sizeof(strs) / sizeof(strs[0]); printStringArray(strs, len); getchar(); return 0; } ~~~ # 指針做輸出 ~~~ #include <iostream> #include <stddef.h> #include <stdlib.h> #include <stdio.h> #include <string.h> void allocateSpace(char **temp) { char *p = (char *)malloc(100); memset(p, 0, 100); strcpy(p, "hello world"); //指針的間接賦值 *temp = p; } int main() { char *p = NULL; allocateSpace(&p); getchar(); return 0; } ~~~
                  <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>

                              哎呀哎呀视频在线观看