fork download
  1. #include <stdio.h>
  2. #include <string.h>
  3. int main() {
  4. char str[100], ch;
  5. fgets(str, 100, stdin);
  6. scanf("%c", &ch);
  7. if (strchr(str, ch)) {
  8. printf("Character found\n");
  9. } else {
  10. printf("Character not found\n");
  11. }
  12. return 0;
  13. }
  14.  
Success #stdin #stdout 0s 5288KB
stdin
Standard input is empty
stdout
Character found