Why doesnt gets() take a char pointer argument if it can take a char array? : Considering this code snippet:

    #include<stdio.h>
    
    int main()
    {
      char *s;
      gets(s);
      printf("%s",s);
      return 0;
    }

I get a runtime error in this case after entering some input at stdin. However if s is declared as an array ,s[size] there is no issue. But considering the gets prototype, char *gets(char *s);  shouldnt it work?