fork download
  1. #include <stdio.h>
  2.  
  3. int main(void)
  4. {
  5. char buf[256] = {0};
  6. char *bufp = buf;
  7. fread(buf, 1, 255, stdin);
  8. if (*bufp == 'a')
  9. {
  10. bufp++;
  11. if(*bufp == 'b')
  12. {
  13. bufp++;
  14. if(*bufp == 'c')
  15. {
  16. bufp++;
  17. if(*bufp == 'd')
  18. {
  19. bufp++;
  20. if(*bufp == 'e')
  21. {
  22. bufp++;
  23. printf("abcde detected\n");
  24. }
  25. } else
  26. if (*bufp == '1')
  27. {
  28. bufp++;
  29. if(*bufp == '2')
  30. {
  31. bufp++;
  32. printf("abc12 detected\n");
  33. }
  34. }
  35. }
  36. }
  37. }
  38. return 0;
  39. }
  40.  
Success #stdin #stdout 0s 2012KB
stdin
abc12
stdout
abc12 detected