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.