title: Why 2nd scanf doesn't work in my program?
body: <p>scanf("%d %c",&amp;size,&amp;chara); works but separate scanf for character input does not work. I show these inside the code. Why is that?</p>
  
  <pre><code>void squareCustomFill(int size, char chara);
  
  int main(void) {
  
  int size,i,k;
  char chara;
  
  printf("Enter size of square: ");   //This works
  scanf("%d %c",&amp;size,&amp;chara);
  
  //printf("Enter fill character: ");      BUT WHY DOES NOT THIS WORK??
  //scanf("%c",&amp;chara);
  
  squareCustomFill(size,chara);
  
  return 0;
  
   }
  
  void squareCustomFill(int size, char chara){
  
  int i,k;
  
  for (k=1;k&lt;=size;k++){
  
      for(i=1;i&lt;=size;i++)
          printf("%c",chara);
          printf("\n");
  
   }
  }
  </code></pre>