#include <stdio.h>
#include <string.h>
void slice(char str[], int start, int end);
int main() {
char name[] = "Shahzebahmedshaikh";
slice(name,8,15);
}
void slice(char str[], int start, int end){
char newstr[100];
int i=0, j=0;
for (i=start; i<end; i++, j++) {
newstr[j] = str[i];
}
newstr[j] = '\0';
puts(newstr);
}
To embed this project on your website, copy the following code and paste it into your website's HTML: