Why is the size of the array output[strlen(input)+1]?

if strlen(input)contains n+1 characters. then why 1 for the output array?

Hello @JAIDEEP_C,

Sir has explained the reason at 10:12 in the video itself.
For better understanding, you can refer to the following code:

Hope, this would help.
Give a like if you are satisfied.

1 Like

I am happy with the code. Thanks for sharing.:grin:

Anytime @JAIDEEP_C,

Please, mark this doubt as resolved.

1 Like