This code executes successfully
int main() {
char str[20];
gets(str);
puts(str);
return 0;
}
whereas the below code gives runtime error
char *str;
why so?