title: how to read space in scanset in C language
body: <p>I am trying to understand scanset in C.</p>
  
  <p>I want to input string that consist of letter A-Z ,a-z and can have spaces between it.</p>
  
  <p>Example : if input is : <code>ABCD abcd 123</code></p>
  
  <p>then output should be : <code>ABCD abcd.</code></p>
  
  <p>I tried to do  this by : <code>scanf("%[A-ZA-Z^\n]",c)</code> , where <code>c</code> is char array but it doesn't read space.</p>
  
  <p>Please suggest a way to do this.</p>