-1
I can’t print the word without the character and I have no idea how to execute the ending. if anyone can help
follow what I’ve done:
#include <stdio.h>
#include <string.h>
int main()
{
char frase[20], nova[20];
char caracter[1];
int x,y;
printf("Informe a frase: ") ;
fgets(frase, sizeof(frase), stdin);
printf("Informe o Caracter: ");
gets(caracter);
for(x=0;x<=strlen(frase);x++)
if(frase[x]!=caracter)
nova[y++]=frase[x];
printf("Frase remontada sem o caracter: %s", nova);
return 0;
}
The statement gives the idea of substitution in the original string and not creation of a new one. It also mentions "remove (...) word" and not letter as it is in your code. You have to clarify these details ?
– Isac