Skip to content

Beta · Data may be lost.Your data may be reset or lost.

GateBrew
← GATE CSE 2017 Set 1
Questions

Q08

MCQ1 mark, −0.33Data structuresMedium

Consider the C code fragment given below.

typedef struct node {
    int data;
    node* next;
} node;
void join(node* m, node* n) {
    node* p = n;
    while(p->next != NULL) {
        p = p->next;
    }
    p->next = m;
}

Assuming that m and n point to valid NULL-terminated linked lists, invocation of join will

Sign in to save attempts.

The solution is hidden while you attempt this question. It opens once you check or show the answer.