0
I’m trying to print the elements of the fruit matrix inside a for
, but the code is not working. Where I am missing?
int main()
{
char frutas[20][4] = {
"Açaí",
"Acerola",
"Abacate",
"Abacaxi",
"Ameixa"
};
int size_elements = sizeof(frutas[0]);
int i;
printf("Total Elementos Matriz: %d\n", size_elements);
for(i = 0; i<size_elements; i++){
printf("%c\n", frutas[i]);
}
system("pause");
return 0;
}
Thanks Isac. It’s perfect!!!
– Kelly Soares