c中数组没有length这个变量,arr.length需要用strlen(arr)代替,需要包含头文件string.h另外,else {flag=false;}改为else {flag=false;break;}