Any ideas on why when I try to compile this code to check if a line from the file atadata
I get the warning:
warning: implicit declaration of function ‘strrev’ [-Wimplicit-function-declaration]
CODE
#include <stdio.h>
#include <string.h>
int main(){
char palindromes[100];
char reverse[100];
FILE *atadata = fopen("atadata","r");
while (fgets(palindromes,sizeof(palindromes),atadata) != NULL){
strcpy(reverse,palindromes);
strrev(reverse);
if( strcmp(atadata,reverse) == 0)
fputs(atadata, stdout);
}
fclose(atadata);
return 0;
}