string.h defined but showing compilation error then strrev is called.

string.h defined but showing compilation error then strrev is called.

in this simple program, it shows compilation error.but why?

#include<stdio.h>
#include<string.h>
int main(void) {
char a[10]="hello";
strrev(a);
printf("%s",a);
return 0;

}

Refer the following link:

https://discuss.codechef.com/questions/15730/is-strrev-function-not-available-in-standard-gcc-compiler

2 Likes