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???