-4

Suppose the code goes like this

void b()
{
...
}
void c()
{
    b();
}



is c considered terminated after the call to b but b has not yet terminated?

nj-ath
  • 3,028
  • 2
  • 25
  • 41

2 Answers2

1

You can verify using debug messages:

void b()
{
    cout << "b()" << endl;
}
void c()
{
    b();
    cout << "ended c()" << endl;
}

So, the ended c() appears after b() message.

Ionică Bizău
  • 109,027
  • 88
  • 289
  • 474
0

No, c() is not supposed to be terminated before b() is terminated in general case.

Alex
  • 9,891
  • 11
  • 53
  • 87