Specify all statements that are true about the following code:
class A {
  public:
    A* next;
} a1, a2, a3;

void iterate(A* a) {
  iterate(a->next);
}

int main() {
  a1.next = &a2;
  a2.next = &a3;
  a3.next = &a1;

  iterate(&a1);

  return 0;
}

Follow CodeGalaxy

Mobile Beta

Get it on Google Play
Send Feedback
Cosmo
Sign Up Now
or Subscribe for future quizzes