I want to get many string inputs with "gets" ("Enter" should be considered as input in my program). but my program always crushes after the first "gets" input This is a simple example that could probably explain what I am talking about:
int main()
{
char* str;
char* str1;
puts("Enter the first String");
gets(str);
fflush(stdin);
puts(str);
puts("Enter the second String");
gets(str1);
puts(str1);
return 0;
}
the program crushes just before getting the second string input