DIGIT-ARC read-only archive · snapshot: July 23, 2026

Understanding multidimensional arrays in c++

6 posts · originally from https://geek.digit.in/community/threads/understanding-multidimensional-arrays-in-c.118340/

chesss
chesss Original post #1
Jun 14, 2009 at 10:10 PM
Heres a simple multi array - char c[10][10] = {"sunday", "monday"};

now my question is, in this case what will be c[0] or c[1] ? and what are their types ?

Please think and answer.
krishnandu.sarkar
Jun 14, 2009 at 10:36 PM
As far i knw multi-D arrays can't b accessed in a single-D array......
But as ths is a char array it may b 's' in c[0]

correct me if i'm wrong...!!
chesss
chesss #3
Jun 14, 2009 at 11:35 PM
But as ths is a char array it may b 's' in c[0]
well I can't be sure, but I think that c[0] is the name/identifier of an array, since the name of an array c[0] allow acts like a pointer, it stores the address of of the first element c[0][0].
Liverpool_fan
Jun 17, 2009 at 6:25 PM
Heres a simple multi array - char c[10][10] = {"sunday", "monday"};

now my question is, in this case what will be c[0] or c[1] ? and what are their types ?

Please think and answer.

c[0] -> "sunday"
c[1] -> "monday"

c[0][0] -> 's' and so so
c[1][0] -> 'm' and so on
adatapost
Jul 5, 2009 at 12:52 PM
char pointer.