How can such an innocuous function break everything?
void strout(char s[],int st,int en){ for(int i = st+1;st<en;i++) putchar(s[i]); }; How can such an innocuous function break everything?
void strout(char s[],int st,int en){ for(int i = st+1;st<en;i++) putchar(s[i]); }; You increase in cycle i , and the condition for exiting the cycle is st<en Thus, you end up increasing i and trying to print garbage.
void strout(char s[],int st,int en){ for(int i = st+1;st<en;i++) putchar(s[i]); }; It is necessary so:
void strout(char s[],int st,int en){ for(int i = st+1;i<en;i++) putchar(s[i]); } Source: https://ru.stackoverflow.com/questions/504289/
All Articles