I dont get how the 2d array works in this case

I got the logic but why did this code does not works if i use 1d array
and when we print the array why do we only pass one parameter to the array

Hey @tAkshat one d array is not Enough as It will store only single alphabet but no words. Whereas 2 d array stores alphabets with words

That’s a default property suppose in your words[1] will be having a complete string “one” in which

words[1][0]='o'
words[1][1]='n'
words[1][2]='e'
words[1][3]='\0'

so if you will do cout<<words[1] it will print ‘one’ till null character, that’s a property of 1d char array.

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.