Language: C

int main(void){
	char text[100],punc;
	int i=0,j,n;
	while(scanf("%s",text)!=EOF){
		n=strlen(text);punc=0;
		if(ispunct(text[n-1])){punc=text[n-1];text[n-1]='\0';}

		if(strcmp(text,"apple")==0)strcpy(text,"peach");
		else if(strcmp(text,"apples")==0)strcpy(text,"peaches");
		else if(strcmp(text,"Apple")==0)strcpy(text,"Peach");
		else if(strcmp(text,"Apples")==0)strcpy(text,"Peaches");
		else if(strcmp(text,"peach")==0)strcpy(text,"apple");
		else if(strcmp(text,"peaches")==0)strcpy(text,"apples");
		else if(strcmp(text,"Peach")==0)strcpy(text,"Apple");
		else if(strcmp(text,"Peaches")==0)strcpy(text,"Apples");

		if(i==0)i++; else printf(" ");
		printf("%s",text);
		if(punc>0)printf("%c",punc);
	}
	printf("\n");
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:4:15: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    4 |         while(scanf("%s",text)!=EOF){
      |               ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | int main(void){
main.c:4:15: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    4 |         while(scanf("%s",text)!=EOF){
      |               ^~~~~
main.c:4:15: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:4:33: error: 'EOF' undeclared (first use in this function)
    4 |         while(scanf("%s",text)!=EOF){
      |                                 ^~~
main.c:4:33: note: 'EOF' is defined in header '<stdio.h>'; this is probably fixable by adding '#include <stdio.h>'
main.c:4:33: note: each undeclared identifier is reported only once for each function it appears in
main.c:5:19: error: implicit declaration of function 'strlen' [-Wimplicit-function-declaration]
    5 |                 n=strlen(text);punc=0;
      |                   ^~~~~~
main.c:1:1: note: include '<string.h>' or provide a declaration of 'strlen'
  +++ |+#include <string.h>
    1 | int main(void){
main.c:5:19: warning: incompatible implicit declaration of built-in function 'strlen' [-Wbuiltin-declaration-mismatch]
    5 |                 n=strlen(text);punc=0;
      |                   ^~~~~~
main.c:5:19: note: include '<string.h>' or provide a declaration of 'strlen'
main.c:6:20: error: implicit declaration of function 'ispunct' [-Wimplicit-function-declaration]
    6 |                 if(ispunct(text[n-1])){punc=text[n-1];text[n-1]='\0';}
      |                    ^~~~~~~
main.c:1:1: note: include '<ctype.h>' or provide a declaration of 'ispunct'
  +++ |+#include <ctype.h>
    1 | int main(void){
main.c:8:20: error: implicit declaration of function 'strcmp' [-Wimplicit-function-declaration]
    8 |                 if(strcmp(text,"apple")==0)strcpy(text,"peach");
      |                    ^~~~~~
main.c:8:20: note: include '<string.h>' or provide a declaration of 'strcmp'
main.c:8:44: error: implicit declaration of function 'strcpy' [-Wimplicit-function-declaration]
    8 |                 if(strcmp(text,"apple")==0)strcpy(text,"peach");
      |                                            ^~~~~~
main.c:8:44: note: include '<string.h>' or provide a declaration of 'strcpy'
main.c:8:44: warning: incompatible implicit declaration of built-in function 'strcpy' [-Wbuiltin-declaration-mismatch]
main.c:8:44: note: include '<string.h>' or provide a declaration of 'strcpy'
main.c:9:50: warning: incompatible implicit declaration of built-in function 'strcpy' [-Wbuiltin-declaration-mismatch]
    9 |                 else if(strcmp(text,"apples")==0)strcpy(text,"peaches");
      |                                                  ^~~~~~
main.c:9:50: note: include '<string.h>' or provide a declaration of 'strcpy'
main.c:10:49: warning: incompatible implicit declaration of built-in function 'strcpy' [-Wbuiltin-declaration-mismatch]
   10 |                 else if(strcmp(text,"Apple")==0)strcpy(text,"Peach");
      |                                                 ^~~~~~
main.c:10:49: note: include '<string.h>' or provide a declaration of 'strcpy'
main.c:11:50: warning: incompatible implicit declaration of built-in function 'strcpy' [-Wbuiltin-declaration-mismatch]
   11 |                 else if(strcmp(text,"Apples")==0)strcpy(text,"Peaches");
      |                                                  ^~~~~~
main.c:11:50: note: include '<string.h>' or provide a declaration of 'strcpy'
main.c:12:49: warning: incompatible implicit declaration of built-in function 'strcpy' [-Wbuiltin-declaration-mismatch]
   12 |                 else if(strcmp(text,"peach")==0)strcpy(text,"apple");
      |                                                 ^~~~~~
main.c:12:49: note: include '<string.h>' or provide a declaration of 'strcpy'
main.c:13:51: warning: incompatible implicit declaration of built-in function 'strcpy' [-Wbuiltin-declaration-mismatch]
   13 |                 else if(strcmp(text,"peaches")==0)strcpy(text,"apples");
      |                                                   ^~~~~~
main.c:13:51: note: include '<string.h>' or provide a declaration of 'strcpy'
main.c:14:49: warning: incompatible implicit declaration of built-in function 'strcpy' [-Wbuiltin-declaration-mismatch]
   14 |                 else if(strcmp(text,"Peach")==0)strcpy(text,"Apple");
      |                                                 ^~~~~~
main.c:14:49: note: include '<string.h>' or provide a declaration of 'strcpy'
main.c:15:51: warning: incompatible implicit declaration of built-in function 'strcpy' [-Wbuiltin-declaration-mismatch]
   15 |                 else if(strcmp(text,"Peaches")==0)strcpy(text,"Apples");
      |                                                   ^~~~~~
main.c:15:51: note: include '<string.h>' or provide a declaration of 'strcpy'
main.c:17:35: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   17 |                 if(i==0)i++; else printf(" ");
      |                                   ^~~~~~
main.c:17:35: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:17:35: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:17:35: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:18:17: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
   18 |                 printf("%s",text);
      |                 ^~~~~~
main.c:18:17: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:21:9: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
   21 |         printf("\n");
      |         ^~~~~~
main.c:21:9: note: include '<stdio.h>' or provide a declaration of 'printf'