#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include<string.h>
int main(void)
{
int count=1;
char number[20]={0};
char *p = number;
gets_s(number);
if (*p == '1')
{
*p++;
while (*p >= '0' && *p <= '9')
{
count++;
*p++;
}
if (count == 11)
{
printf("yes");
return 0;
}
}
printf("no");
return 0;
}
运行后c语言数组越界访问
是不gets的问题
如何修改