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

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

Текущая версия на 10:22, 25 мая 2010

strrchr: returns a pointer to the last occurrence of ch in *str

    
 
//Declaration:  char *strrchr(const char *str, int ch); 
//Return:       returns a pointer to the last occurrence of ch in *str. 
  #include <string.h>
  #include <stdio.h>
  int main(void){
    char *p;
    p = strrchr("this is a test", "i");
    printf(p);
    return 0;
  }
         
/*
is a test*/