In the code, if we use an integer n to store strlen(str), the output by for loop becomes different than used here! Why is that happening?
void helper(char str[], int start){
int n=strlen(str)
if(str[start]=='\0'||str[start]=='\0')
return;
helper(str,start+1);
if(str[start]=='p' && str[start+1]=='i'){
for(int i=n;i>=start+2;i--){
str[i+2]=str[i];
}
str[start]='3';
str[start+1]='.';
str[start+2]='1';
str[start+3]='4';
}
}