Why do we need to use `strcpy()` for copying a string into a char array?

I have wasted my 2 hours in this.It has not shown me any error but the output was not as I expected and I struggled 2 hours to find out the error.

It was just displaying a garbage char.

when I use `strcpy()` it works fine.