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

                # strtok 演示 期望的結果是`s`字符串被截斷為`12345`: ```c #include <stdio.h> #include <string.h> int main(int argc, char const *argv[]) { char *s = "123456789"; char *tmp = NULL; tmp = strtok(s, "6"); printf("%s\n", s); return 0; } ``` 實際運行的結果為 ```javascript Bus error: 10 ``` # 修改下 ```c #include <stdio.h> #include <string.h> int main(int argc, char const *argv[]) { // char *s = "123456789"; char s[10] = "123456789"; char *tmp = NULL; tmp = strtok(s, "6"); printf("%s\n", s); return 0; } ``` 結果正常了 ```javascript zhoumengkang@bogon:~/Downloads$ gcc test2.c -o test2 zhoumengkang@bogon:~/Downloads$ ./test2 12345 ``` `char *s`是存在只讀區(常量區),不能被改寫; `char s[10]`是存在棧上,是可以隨意改寫的。
                  <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>

                              哎呀哎呀视频在线观看