+ 3
How to print the value of ch[0][1][0] . Please check the code and give me answer..
https://code.sololearn.com/cwBHOuj23EPk/?ref=app If code is wrong then please give me right code..đđ
1 Answer
0
char ch[2][3][15] is a 2x3 array of strings (char[15]). You are reading the input wrong, you should use both i and j: scanf("%s", ch[i][j]);
ch[0][1][0] is the first char at the first row, second column. What you want is the string, so remove the [0] at the back: printf("\n%s", ch[0][1]);