What happens on a program compilation?
struct A {
    int k;
    A* next;
};

void f(A*& begin)
{
    A p = new A;
    begin = p;
    begin->k = 32;
    p->next = NULL;
    delete p;
}

void main()
{
    A* b = new A;
    f(b);
}

Follow CodeGalaxy

Mobile Beta

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