title: why should we not include the last array element in sprintf?
body: <p>I have a code shown as below, the last statement works only if I use l_plates[i]. In the below case it throws an error "passing argument 1 of 'sprintf' makes pointer from integer without a cast"
  What if I need another for loop for N too. Should I use an extra element if I use sprintf?
  please explain. thanks in advance.</p>
  
  <pre><code>char type, letters[4], digits[5];
  char l_plates[M][N];
  
  for (i=0; i&lt;M; i++) {
      scanf(" %c", &amp;type);
      scanf("%3s", letters); 
      scanf("%4s", digits); 
      sprintf(l_plates[i][N], "%s %s %c", letters, digits, type);
  }
  </code></pre>