Code:
for ( ptr ; ptr >= message; ptr--){
putchar(*ptr);
}
I'm guessing this would give you an undefined result. In the initialization part of the for loop, what are you assigning to ptr? An array always starts with 0, so the conditional expression
ptr >= message
is just asking for trouble.
Be more explicit with what you want the computer to do or it will give you problems when it tries to interpret your instructions. In this case
Code:
for ( ptr = &message[99]; ptr >= &message[0]; ptr-- ) {
/*
**ptr is assigned to the address of the last element of the array
**so there's no doubt as to where the loop starts. You loop until
**the pointer gets to the address of the 0th element of the array.
**Simple and easy to understand, for both the reader and the
**compiler.
*/