How does this print work?
P13: (B) Given the following struct definition (assume there's a constructor that sets all the fields), what is printed out?:
class Info {
public:
string a;
string b;
int c;
Info *next;
};
int main() {
Info *first = new Info("tun", "ne", "I", NULL);
first->next = new Info("ha", "rd", "ware", NULL);
Info *tmp = first->next;
tmp->next = new Info("recur", "s", "ion", NULL);
for (Info x = first; x != NULL; x = x->next) {
// What is printed here?
cout << x->b;
} // for
cout << "endI";
} // main