Open srivastavHimanshu4503 opened 1 month ago
The following code is working completely right.
char* slice(char str[], int m, int n){ str = &str[m]; str[n-m+1] = '\0';
return str;
} int main(){ char str[] = "Himanshu Srivastav"; int m = 6; int n = 11;
printf("%s\n", slice(str, 6, 11));
return 0;
} Hope this will implemented soon.
include
char slice(char str[], int m, int n){ int i=0, count;
char ptr1 = &str[m]; char *ptr2 = &str[n];
} int main(){ char str[] = "Himanshu Srivastav";
}