2D-Char Array in Replace PI problem

piRec function is accepting only first row of 2d char array.

But when i use string data type instead of 2d char array, its working fine.

@ksalokya if you want to pass a 2d array use char **a or char [][6]

tried. still not working

@ksalokya its working fine https://ide.codingblocks.com/s/585285

please check again. getting same output

@ksalokya if you want to use c style character array then you have to use corresponding functions also. == works for strings, not for char arrays, you have to use strcmp for that. You can avoid this confusion by sticking to either strings or character arrays. I would recommend using the string datatype since it is newer and has more features. https://ide.codingblocks.com/s/585310

Thanks a lot! You can close this thread.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.