Wrong output? PLease explain my mistake in code
Sir, Reason? …
the reason is working of cout
cout<<x;
if x is character array then it print till ‘\0’
but if it is string it will print the whole string according to size of string
to understand better run this code
Ohh okay thank you sir!!
i hope this help and your doubt is resolved
if you have more doubts regarding this feel free to ask
if your doubt is resolved mark it as resolved from your doubt section inside your course