This is what i have to do-
changePi("xpix") → "x3.14x"
changePi("pipi") → "3.143.14"
changePi("pip") → "3.14p"
When i run it, it doesnt print the array, just returns 0;
I just need some guidance to where im going wrong.
you create another `b' each time you call the function, so when you print at the end, that `b' was uninitialised.
you need to pass it as an extra argument
1 2 3 4
int main(){
char a[200], b[big_enough];
//...
changePi(a, 0, b, 0);