Checkpoint 5.2.1.
What order will the letters be printed in the program below? Trace the execution by hand and arrange the blocks in the order the output would be printed.
Start in
main. Every time you encounter a function call, remember where you are so you can return there when you are done with the function.
#include <iostream>
using namespace std;
void doThing() {
cout << "A" << endl;
}
void doOther() {
cout << "B" << endl;
}
void doIt() {
cout << "C" << endl;
}
void doThat() {
cout << "D" << endl;
}
void doMultiple() {
doThat();
doOther();
cout << "E" << endl;
doIt();
}
int main() {
cout << "F" << endl;
doMultiple();
doThing();
}
