+ 3
if t[i] is an array of string and i want the first caracter of eatch oneof it :t[i][0] but it shows that it will be a matrix!!
4 Respuestas
+ 4
Tyt
What? What is your confusion?
If you understand the concept of pointers in C, then you can easily understand any programming language.
In C, a matrix can be defined in 3 modes:
int matrix[3][2]; // char matrix[3][2];
int *matrix[2]; // char *matrix[2];
int **matrix; // char **matrix;
Now, on your example:
*t[i] is an array of strings
t[i][0] is the first char in the i-th string.
+ 2
Thank you
+ 2
Thanks guys