I was trying to display array of strings given by user. I used char to declare string and for loop for input and display. Can anyone tell me what is wrong with the code.
#include <stdio.h>
#include <string.h>
int main()
{
int n,i;
scanf("%d",&n);
strings st[n];
for( i = 0; i<n ; i++){
scanf("%s",st[i]);
}
for( i = 0; i<n ; i++){
printf("%s \n",st[i]);
}
}