What is the output of the following C code? Assume that the address of \(x\)…

GATE · 2015 · CS · Set 1 · Computer Science & IT

What is the output of the following C code? Assume that the address of xx is 2000 (in decimal) and an integer requires four bytes of memory.

int main () {
    unsigned int x[4][3] =
        {{1,2,3},{4,5,6},{7,8,9},{10,11,12}};
    printf("%u, %u, %u", x+3, *(x+3), *(x+2)+3);
}
  1. A.

    2036, 2036, 2036

  2. B.

    2012, 4, 2204

  3. C.

    2036, 10, 10

  4. D.

    2012, 4, 6

Attempted by 234 students.

Sign up free to check your answer

Sign up free

Explore the full course: Gate Guidance By Sanchit Sir

Loading lesson…