Character array

Why do we need to add ‘\0’ at the end of row while initialising a char array? Thank you

hello @Samarth_Shah
this indicates the end of the array. compiler use this delimeter the find where string/char array ends.
if u dont include this then compiler will not know the end of ur char array and it will not stop printing until it encounter \0.

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.