im making a pointer array to strings and this issue happened
Is there anythings wrong with my code
char x[50];
int num = 0;
int i = 0;
char* arrs;
printf("Enter number");
scanf("%d", &num);
arrs = (char*)malloc(sizeof(char) * num);
getchar();
for (i = 0; i < num; i++)
{
printf("Enter str number %d\n" , i);
fgets(x, 50, stdin);
*(arrs+i) = (char)malloc(sizeof(char) * strlen(x));
strcpy((arrs+ i), x);
}