/******************************************************************************
Welcome to GDB Online.
GDB online is an online compiler and debugger tool for C, C++, Python.
Code, Compile, Run and Debug online from anywhere in world.
*******************************************************************************/
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
char *strrev(char const *s) {
size_t n = strlen(s);
char *r = calloc(n + 1, 1);
for(size_t i = 0; i < n; ++i) {
r[i] = s[n - i - 1];
}
return r;
}
int main()
{
puts(strrev("Hello World"));
return 0;
}