The following program works in gcc but on giving the value of T = 6, this program continues and does not end on asking for input strings. Any help guys if you recognise whats wrong with this program?
int main()
{ int T,i,j;
char *strings[T];
printf("Enter the Number of Strings to Reverse : \n");
scanf("%d ",&T);
for(i=0;i<T;i++)
{ strings[i] = (char *)malloc(100*sizeof(char));
scanf("%s\n",strings[i]);
}
for(i=0;i<T;i++)
{printf(" The String %d is : %s\n",i+1,strings[i]);
}
return 0;
}