title: Taking string input in char pointer
body: <pre><code>#include&lt;stdio.h&gt;
  #include&lt;string.h&gt;
  #include&lt;stdlib.h&gt;
  
  int main(){
      char *s;
      printf("enter the string : ");
      scanf("%s", s);
      printf("you entered %s\n", s);
      return 0;
  }
  </code></pre>
  
  <p>When I provide small inputs of length up to 17 characters (for example "aaaaaaaaaaaaaaaaa") the program works perfectly fine but on providing inputs of larger lengths, it gives me a runtime error saying "main.c has stopped working unexpectedly". </p>
  
  <p>Is there some problem with my compiler (codeblocks) or my pc (windows 7)? Or is it somehow related to the input buffer of C? </p>