Issue
I am unable to use strrev() function even after including string.h in Ubuntu 20.04. Compiler says undefined reference to strrev(), but strlen() and other functions work. What should I do?
Solution
You need to implement it yourself.
char *strrev(char *str)
{
char *end, *wrk = str;
{
if(str && *str)
{
end = str + strlen(str) - 1;
while(end > wrk)
{
char temp;
temp = *wrk;
*wrk++ = *end;
*end-- = temp;
}
}
}
return str;
}
Answered By - 0___________