Replacing pi problem

why my code is giving segmentation fault

@dreamerekta if(a[i]=’\0’ && a[i+1]==’\0’)
how can both be null characters? only one of them will be null na, so it should be OR, not AND

@dreamerekta
image
i is index, check for a[i] and a[i+1] here

@dreamerekta Is your doubt resolved?

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.