+ 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!!

6th Jan 2022, 8:33 PM
Tyt
3 Answers
+ 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.
6th Jan 2022, 8:47 PM
Romeo Cojocaru
Romeo Cojocaru - avatar
+ 2
Thank you
6th Jan 2022, 10:04 PM
SoloProg
SoloProg - avatar
+ 2
Thanks guys
7th Jan 2022, 8:07 AM
Tyt