adplus-dvertising
frame-decoration

Question

Which of the following will print the value 2 for the above code?
#include <stdio.h>
int main()
{
    int arr[10][20][30] = {0};
    arr[3][2][1] = 2;
    return 0;
}

a.

printf("%d",*(((a+3)+2)+1));

b.

printf("%d",***((a+3)+2)+1);

c.

printf("%d",*(*(*(a+3)+2)+1));

d.

None of the above

Posted under C Programming

Answer: (c).printf("%d",*(*(*(a+3)+2)+1));

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. Which of the following will print the value 2 for the above code?