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

                ??一站式輕松地調用各大LLM模型接口,支持GPT4、智譜、豆包、星火、月之暗面及文生圖、文生視頻 廣告
                # C `strchr()`函數 > 原文: [https://beginnersbook.com/2017/11/c-strchr-function/](https://beginnersbook.com/2017/11/c-strchr-function/) 函數`strchr()`在給定字符串中搜索指定字符的出現,并返回指向它的指針。 ## C `strchr()`函數 ```c char *strchr(const char *str, int ch) ``` `str` - 在其中搜索字符的字符串。 `ch` - 在字符串`str`中搜索的字符。 ## `strchr()`的返回值 它返回指向給定字符串中字符的第一次出現的指針,這意味著如果我們顯示指針的字符串值,那么它應該顯示從指定字符的第一次出現開始的輸入字符串部分。 ## 示例:C 中的`strchr()`函數 在這個例子中,我們有一個字符串,我們正在使用`strchr()`函數在字符串中搜索字符`'u'`。當我們顯示函數返回指針的字符串值時,它顯示從字符`'u'`開始的字符串,這是因為函數返回的指針指向字符串中的字符`'u'`。 ```c #include <stdio.h> #include <string.h> int main () { const char str[] = "This is just a String"; const char ch = 'u'; char *p; p = strchr(str, ch); printf("String starting from %c is: %s", ch, p); return 0; } ``` 輸出: ```c String starting from u is: ust a String ``` #### 相關文章: 1. [C - `strcat()`函數](https://beginnersbook.com/2017/11/c-strcat-function-with-example/) 2. [C - `strncat()`函數](https://beginnersbook.com/2017/11/c-strncat-function/)
                  <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>

                              哎呀哎呀视频在线观看