Skip to content

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

GateBrew
← GATE CSE 2016 Set 1
Questions

Q15

NAT1 markEasy

Consider the following C program.

# include <stdio.h>
void mystery (int *ptra, int *ptrb) {
    int *temp;
    temp = ptrb;
    ptrb =ptra;
    ptra = temp;
}
int main () {
    int a = 2016, b=0, c= 4, d = 42;
    mystery (&a, &b);
    if (a < c)
        mystery (&c, &a);
    mystery (&a, &d);
    printf("%d\n", a);
}

The output of the program is _________.

Sign in to save attempts.

Solutions and discussion are hidden while you attempt this question. They open once you check or show the answer.