Initialization of character array

So I was watching a lecture on 2-D character arrays and there were 2-3 methods of initialization, I have a doubt in the method where we initialize row by row in the form of a string.

So I initialized 3 rows and I guess in this method the rest automatically gets initialized to nil character. But when I ran my code and tried to output some string which wasn’t initialized, it showed garbage value.
When I ran the same code on CB IDE, the output was nothing which is as expected, but when I ran the code on Visual Studio Code, garbage value was displayed on the console.

this is the link to the program.

and below is the image of the output that was on my console.

hello @priyam04

output for non initilaised value will depend on compiler.
some may intialise with null or 0 some may give garbage.

always assume that u r going to get garabge values for uninitilased value

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.