hi all, i have this code which is supposed to display the elements of a char array but the problem is that its displaying funny symbols not the elements. does anyone know why?
char *list[]={"a","m","t"};
for(i=1; i<=3; i++)
{
list[i]=(char *)malloc(4*sizeof(char));
}
printf("The elements are: ");
for(i=1; i<=3; i++)
{
printf(" %s\t", &list[i]);
}