strchr.c 264 B

12345678910
  1. #include <string.h>
  2. #include <stdio.h>
  3. int main(int argc, char* argv[]) {
  4. printf("%s\n", strchr("hello", 'e')); // should be ello
  5. printf("%s\n", strchr("world", 'l')); // should be ld
  6. printf("%i\n", strchr("world", 0) == NULL); // should be 1
  7. return 0;
  8. }