Advertisement
Guest User

Untitled

a guest
Oct 15th, 2019
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.72 KB | None | 0 0
  1. /******************************************************************************
  2.  
  3. Online C Compiler.
  4. Code, Compile, Run and Debug C program online.
  5. Write your code in this editor and press "Run" button to compile and execute it.
  6.  
  7. *******************************************************************************/
  8.  
  9. #include <stdio.h>
  10.  
  11. char *start(char *str, char *car)
  12. {
  13. int i;
  14. int o;
  15.  
  16. o = 0;
  17. i = 0;
  18. while (str[i])
  19. {
  20. while (car[o] && str[i])
  21. {
  22. while (car[o] == str[i])
  23. i++;
  24. o++;
  25. i++;
  26. }
  27. if (car[o] != str[i])
  28. break ;
  29. }
  30. return (str + i);
  31. }
  32.  
  33.  
  34.  
  35. int main()
  36. {
  37. printf("%s", start("HellloH World", "Heelo"));
  38.  
  39. return 0;
  40. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement