C | Arrays | Question 13

filter_none

edit
close

play_arrow

link
brightness_4
code

#include<stdio.h>
int main()
{
    int a[10][20][30] = {0};
    a[5][2][1] = 2;
    return 0;
}

chevron_right


Which of the following will print the value 2 for the above code?
(A) printf(“%d”,*(((a+5)+2)+1));
(B) printf(“%d”,***((a+5)+2)+1);
(C) printf(“%d”,*(*(*(a+5)+2)+1));
(D) None of these


Answer: (C)

Explanation:

Quiz of this Question



My Personal Notes arrow_drop_up


Article Tags :
Practice Tags :


Be the First to upvote.


Please write to us at contribute@geeksforgeeks.org to report any issue with the above content.