0

strrev function error

#include <stdio.h> #include <string.h> int main() { char s[100]; printf("enter a string\n"); fgets(s,100,stdin); strrev(s); printf("reverse of string:%s",s); return 0; } when i run the program i get error

13th Mar 2020, 11:46 AM
Prince Kumar
Prince Kumar - avatar
1 Antwort
+ 4
strrev() is not standard library function. So it may not be available on some compilers, for example gcc. You should code it by yourself.
13th Mar 2020, 11:58 AM
andriy kan
andriy kan - avatar