idk

Lines 8 and 9 are in the wrong order.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#include <iostream>

void print_reversed_lc_letters( const char *str )
{
    if( str != nullptr && *str != 0 )
    {
        print_reversed_lc_letters(str+1); // do this first

        // note that checking for lower case this way is not a good idea:
        if( *str >= 'a' && *str <= 'z' ) std::cout << *str;
    }
}

int main()
{
    const char str[] = "AbCd EfGh IJkl MNOpqr STUVwxyz!";
    print_reversed_lc_letters(str);
}
closed account (E0p9LyTq)
DON'T delete the content of your posts! This is NOT your private tutor service.
I guess OP did not get the memo.

Link: http://www.cplusplus.com/forum/beginner/251250/
closed account (E0p9LyTq)
Maybe he finally did get the memo, he closed his account.
Topic archived. No new replies allowed.