i didn’t know the error pls sort this out and what does null character (’\0’) mean why are we using it
Desired outupt is not coming
in code you have mistyped
it should be ‘/0’ not ‘/n’
'\ 0 ’ is idiomatic for specifying a NUL character (because you cannot type such a character from the keyboard or display it in your editor).
The NUL character is used in C and C++ to terminate a string stored in a character array.
in simple words we can say that
‘/0’ represent ending of character array
hence can be used to check whether we are at end of string(character array) or not
while traversing
modified Code