It says RunTime error

@prateek_5
hello praveen,
image

add this if statement before line no 11

1 Like

yes, it worked but why did it not work there?

u were calculating strlen(NULL) thats why it was giving run error

1 Like

when I add even a cout statement it throws error. why?

got the point.

thank you so very much.

I was stuck in here for couple of hours.
thank you

same reason u cannot print NULL pointer

1 Like