用字符数组作函数参数编程实现如下功能:在字符串中删除与某字符相同的字符。**提示信息:“Input a string:“ “Input a character:“**输入格式要求:“%s

#include<stdio.h>
#include<string.h>
#define N 20
int main(void)
{
    char A[N];
    printf("Input a string:");
    fgets(A,sizeof(A),stdin);
    printf("Input a character:");
    char x;
    scanf("%c",&x);
    int i,j;
    int len=strlen(A);
    for(i=strlen(A);i>=0;i--)
    {
        if(A[i]==x)
        {
            for(j=i;j<len;j++)
            {
                A[j]=A[j+1];
            }
        }
    }
    printf("Results:%s\n",A);
}