title: Scan strings into array in C
body: <p>I want to scan these values to an array. I created a struct and the array is of that type.
  My problem is that, when i compile, all the ints work fine, but when it comes to the strings it doesn't let me insert any values and jumps to the next instruction of my code. 
  What am I doing wrong?</p>
  
  <pre><code>printf("\nInsert id: ");
  scanf("%i", &amp;vDisp[MAXDISP].idComp);
  printf("\nInsert serial number: ");
  scanf("%i", &amp;vDisp[MAXDISP].serial);
  printf("\nInsert production year: ");
  scanf("%i", &amp;vDisp[MAXDISP].year);
  
  printf("\nInsert brand: ");
  scanf("%[^\n]%*c", &amp;vDisp[MAXDISP].brand);
  printf("\nInsert type: ");
  scanf("%[^\n]%*c", &amp;vDisp[MAXDISP].type);
  printf("\nInsert model: ");
  scanf("%[^\n]%*c", &amp;vDisp[MAXDISP].model);
  printf("\nInsert OS: ");
  scanf("%[^\n]%*c", &amp;vDisp[MAXDISP].system);
  </code></pre>
  
  <p>Thanks in advance!</p>