scanf 函数的输入有关问题

scanf 函数的输入问题
#include <stdio.h> // 无问题的代码 重复输入保证不问题
#include <stdlib.h>
main()
{
  int a,b;
  int c;
  while(1){
  scanf("%d %d %d",&c,&a,&b);
  if( c == 5) printf("1 %d %d %d\n",a,b,c);
  printf("2 %d %d %d",a,b,c);
  system("pause");}
  return 0;
}
#include <stdio.h> // 是有问题的..这个很让人纠结... 你可以自己试几个...
#include <stdlib.h>
main()
{
  int a,b;
  int c;
  while(1){
  scanf("%c %d %d",&c,&a,&b);
  if( c == 'c') printf("1 %d %d %c\n",a,b,c);
  printf("2 %d %d %c",a,b,c);
  system("pause");}
  return 0;
}
我很想弄明白这是怎么回事 . 是不是输入时的缓冲区有问题? 期待高手..

------解决方案--------------------
输入的格式一定要注意,试试不空格去了。
------解决方案--------------------
楼主可以看看:
http://topic.****.net/u/20100413/22/e1f309ba-437c-4375-9eb6-b1be52da6429.html
------解决方案--------------------
是不是输入时的缓冲区有问题?
是的.
scanf("%c %d %d",&c,&a,&b);
比如你输入:1 2 3 \n
第一次循环,.c=1,a=2,b=3
输入缓冲区还剩\n,第2次循环c='\n'
------解决方案--------------------
探讨

楼主可以看看:
http://topic.****.net/u/20100413/22/e1f309ba-437c-4375-9eb6-b1be52da6429.html

------解决方案--------------------
scanf("%c %d %d",&c,&a,&b);
—— c是int,输入时候却用了%c