Hello, I am trying to delete a substring from a string. I am trying to use pointers and return the value where the substring occurrence is found. But I am lost. Here is what I have so far ----
Code:int delete_substring(char *str, char *substr) { int i; char *position = strstr(str, substr); if (!position) return -1; return position - str; }