title: how to scan a character and integer together in c
body: <p>I am writing code for scanning character and integer together in the format like
  R 2</p>
  
  <p>but the following code gives unexpected result and i am not able to scan a character and integer togather</p>
  
  <pre><code>int main()
  {
  long int m,i;
  scanf("%ld",&amp;m);
  char que[m];
  long int d[m];
  for (i=0; i&lt;m; i++) {
      scanf("%c ",&amp;que[i]);
      scanf("%ld",&amp;d[i]);
  }
  for (i=0; i&lt;m; i++) {
      printf("%c  %ld",que[i],d[i]);
  }
  </code></pre>