C Tutorial/string.h/strchr — различия между версиями

Материал из C\C++ эксперт
Перейти к: навигация, поиск
м (1 версия: Импорт контента...)
 
(нет различий)

Версия 17:21, 25 мая 2010

strchr

Item Value Header file string.h Declaration char *strchr(const char *str, int ch); Return returns a pointer to the first occurrence of ch in *str or a null pointer if not found.


<source lang="cpp">#include <stdio.h>

 #include <string.h>
 int main(void)
 {
   char *p;
   p = strchr("this is a test", " ");
   printf(p);
   return 0;
 }</source>