I run this C++ code and it prints "ABACABA" on the screen.Can someone give me a detailed explanation of how recursive calls work in this example? I can`t understand why i get that output.
#include <iostream>
using namespace std;
void f( char c)
{
if (c > 'A') f(c-1);
cout << c;
if (c > 'A') f(c-1);
}
int main()
{
f('C');
}