Skip to content

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

GateBrew
← GATE CSE 2022
Questions

Q11

MCQ1 mark, −0.33Programming

What is printed by the following ANSI C\text{ANSI C} program?

#include<stdio.h>
int main(int argc, char *argv[])
{
    int x = 1, z[2] = {10, 11};
    int *p = NULL;
    p = &x;
    *p = 10;
    p = &z[1];
    *(&z[0] + 1) += 3;
    printf("%d, %d, %d\n", x, z[0], z[1]);
    return 0;
}
Sign in to save attempts.

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