title: How to read string from keyboard using C?
body: <p>I want to read a string entered by the user. I don't know the length of the string. As there are no strings in C I declared a pointer:</p>
  
  <pre><code>char * word;
  </code></pre>
  
  <p>and used <code>scanf</code> to read input from the keyboard:</p>
  
  <pre><code>scanf("%s" , word) ;
  </code></pre>
  
  <p>but I got a segmentation fault.</p>
  
  <p>How can I read input from the keyboard in C when the length is unknown ?</p>