title: scanf(%s) not allowing space? C Programming
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/1247989/how-do-you-allow-spaces-to-be-entered-using-scanf">How do you allow spaces to be entered using scanf?</a>  </p>
  </blockquote>
  
  
  
  <pre><code>char inputStr[64];
  int inputInt;
  printf("Enter a number:");
  scanf("%d",&amp;inputInt);
  printf("\nEnter a string:");
  scanf("%s",&amp;inputStr);
  </code></pre>
  
  <p>The above code has 2 part, reading a integer and string.</p>
  
  <p>Reading an integer is fine.</p>
  
  <p>Reading a string also fine considering characters are under 64 and there is no SPACE.</p>
  
  <p>That is the problem.</p>
  
  <p><code>scanf</code> only reads the character up to a space.</p>
  
  <p>Everything after the space is gone.</p>
  
  <p>How can I include the space also in scanf?</p>