Iam trying to reverse a string using the strrev function in ubuntu. But iam getting two errors which says , "warning: implicit declaration of function ‘strrev’; did you mean ‘strsep’? [-Wimplicit-function-declaration]" and another error " warning: format ‘%s’ expects argument of type ‘char *’, but argument 2 has type ‘int’ [-Wformat=].Can anyone please help me resolve this problem. I have not learn pointers yet, so is there another method?
#include <stdio.h>
#include <string.h>
int main()
{
char str[10] = "madam";
printf("the given string is %s\n",str);
printf("after reversing :%s",strrev(str));
return 0;
}