+ 2

Why strrev function is not working at sololearn ide ?

#include <stdio.h> #include <string.h> int main() { char s[50]; gets(s); printf("%s",strrev(s)); return 0; }

7th Jul 2020, 10:05 AM
Ayush Anand
Ayush Anand - avatar
6 ответов
+ 3
The thing is, strrev is only defined on a windows machine. Sololearn runs the code on a linux machine, however, if you try to run the code often enough you will eventually run it in a windows machine ( for some reason ) and then it will work. I guess Rowsej just got lucky there, because it took me around 20 tries.
7th Jul 2020, 10:23 AM
Dennis
Dennis - avatar
+ 2
Works perfectly for me...
7th Jul 2020, 10:12 AM
Rowsej
Rowsej - avatar
+ 2
Really
7th Jul 2020, 10:13 AM
Ayush Anand
Ayush Anand - avatar
+ 2
Copy the code and try it
7th Jul 2020, 10:14 AM
Ayush Anand
Ayush Anand - avatar
+ 2
Yes I tried it. I gave hello as the input and got olleh as the output!
7th Jul 2020, 10:15 AM
Rowsej
Rowsej - avatar
+ 2
But not working for me.
7th Jul 2020, 10:16 AM
Ayush Anand
Ayush Anand - avatar