title: How can I get a string from user without spaces using scanf?
body: <p>This is a C code to get a string for types of brackets '()' &amp; '&lt;>' &amp; '{}' &amp; '[]' from user. The length of this string is n and it is an user input.</p>
  
  <pre><code>int main()
  {
    long int n;
    int i;
    scanf("%lld", &amp;n);
    char array[n];
    for(i=0; i&lt;n ; i++)
    {
       scanf("%s", &amp;array[i]);
    }
   }
  </code></pre>
  
  <p>The problem is I want to get the string without any spaces between them from user. But, this code is working for the input with space between each character and give the correct result.</p>
  
  <p>For example, if I type <code>{(()</code> the program won't run. but if I type <code>{ ( ( )</code> the program shows the correct result. 
  How can I solve this problem?</p>