strchr.c 277 B

1234567891011
  1. #include <string.h>
  2. #include <stdio.h>
  3. #include <stdlib.h>
  4. int main(void) {
  5. printf("%s\n", strchr("hello", 'e')); // should be ello
  6. printf("%s\n", strchr("world", 'l')); // should be ld
  7. printf("%i\n", strchr("world", 0) == NULL); // should be 1
  8. return EXIT_SUCCESS;
  9. }