fork download
  1. #include <stdio.h>
  2.  
  3. void removeFirstAndLastChar(char** string) {
  4. *string += 1; // Removes the first character
  5. int i = 0;
  6. for (; (*string)[i] != '\0'; i++);
  7. (*string)[i - 1] = '\0';
  8. }
  9.  
  10. int main(void) {
  11. char* title = (char[]){"ABC"};
  12. removeFirstAndLastChar(&title);
  13. printf("%s", title);
  14. return 0;
  15. }
Success #stdin #stdout 0s 2168KB
stdin
Standard input is empty
stdout
B