<<< Pointers and arrays | Index | Arrays of pointers example >>> |
Construction of the arrays of pointers is also allowed.
Most frequent use of arrays of pointers is to store character strings of variable lengths:
char* months[] = { "Illegal", "Jan", "Feb", "Mar" };
months[ 0 ] = 00476FEC : | I | l | l | e | g | a | l | \0 |
months[ 1 ] = 00476FF4 : | J | a | n | \0 | ||||
months[ 2 ] = 00476FF8 : | F | e | b | \0 | ||||
months[ 3 ] = 00476FFC : | M | a | r | \0 |
<<< Pointers and arrays | Index | Arrays of pointers example >>> |