fork download
  1. #include <stdio.h>
  2.  
  3. int main(void) {
  4. char a[]= "helablo";
  5. int i, j;
  6.  
  7. for(j = i = 0; a[i]; ++i){
  8. if(a[i] == 'a' && a[i+1] == 'b'){
  9. a[j++] = 'c';
  10. ++i;
  11. } else {
  12. a[j++] = a[i];
  13. }
  14. }
  15. a[j] = '\0';
  16.  
  17. printf("%s\n", a);
  18. return 0;
  19. }
Success #stdin #stdout 0s 9432KB
stdin
Standard input is empty
stdout
helclo