#include <unistd.h>
int ft_strlen(char *str)
{
int i;
i = 0;
while (str[i] != '\0')
{
i++;
}
return(i);
}
char *ft_rev_print (char *str)
{
int i;
i = ft_strlen(str);
i--;
while (i >= 0)
{
write(1, &str[i], 1);
i--;
}
}
int main ()
{
char str[] = "mauricio";
ft_rev_print(str);
}
To embed this project on your website, copy the following code and paste it into your website's HTML: