初学代码(删除字符串)
void delchar(char arr[], char ch)
{
char* p = arr;
int i = 0;
while (*p != ch)
{
p++;
if (*p ==
)
{
printf("数组中没有该字符");
break;
}
}
while (*p !=
)
{
*p = *(p + 1);
p++;
if (p == &arr[9])
break;
}
*(p - 1) =
{
char* p = arr;
int i = 0;
while (*p != ch)
{
p++;
if (*p ==
)
{
printf("数组中没有该字符");
break;
}
}
while (*p !=
)
{
*p = *(p + 1);
p++;
if (p == &arr[9])
break;
}
*(p - 1) =