adplus-dvertising
frame-decoration

Question

What will be the output of the program if the array begins at 1000 and each integer occupies 2 bytes?
void main()
{
    int arr[2][2] = { 1, 2, 3, 4 };
    printf("%u, %u", arr+1, &arr;+1);
}

a.

1004 1008

b.

1002 1008

c.

1002 1002

d.

1008 1002

Answer: (a).1004 1008

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. What will be the output of the program if the array begins at 1000 and each integer occupies 2 bytes?