windows 使用gcc

windows 使用gcc好奇怪的问题
windows下使用gcc编译出来的程序,只要有参数输入的运行到一半就出错,提示应用程序已经停止工作,无参数输入的正常运行,我比较菜,实在想不出为什么,求大神赐教

------解决方案--------------------
推荐c教材:
c primer plus

代码纠正:
#include<stdio.h>
int main(void){
char a[1024];
printf("please input a string :\n");
scanf("%s",a);
printf("you input string is %s",a);
return 0;
}