strrev is not a C standard function , so in most of the compiler it doesn't work !
so , solve by counting number of characters in string (by strlen()) , apply loop from last (length of string) to first !
/*strlen counts no.of characters in string except null , use string.h header file .*/
for(int i=length-1 ; i>=0 ; i--)
printf ("%c",str[ i ] );