Skip to content

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

GateBrew
← GATE CSE 2017 Set 2
Questions

Q14

MCQ1 mark, −0.33

Consider the following function implemented in C:

void printxy(int x, int y) {
    int *ptr;
    x=0;
    ptr=&x;
    y=*ptr;
    *ptr=1;
    printf("%d, %d", x, y);
}

The output of invoking printxy(1,1)printxy(1,1) 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.