print string in reverse order with unknown length and without using libraries

Hi,
Is it possible to print a string in reverse order without knowing length and without using string libraries? (just using pointers)
void printReverse(char input[]){...}

When we use chars in usual order, the code below can help us:

void printUsual(char input[]) {
while (*input)
printf("%c", *input++);
}

Is it possible to change the code above to print in reverse order?
Thanks in advance,
You have to loop twice, first time from the beginning to the end of your string to find the NULL termination character, and then loop back to print it... why is that supposed to be too hard???
Recursion:
1
2
void print_reverse( const char* cstr )
{ if( cstr && *cstr ) { print_reverse(cstr+1) ; std::cout << *cstr ; } }
Thanks all :)
Topic archived. No new replies allowed.