question based on C programming

0 votes
asked Feb 11, 2018 by anonymous

Consider the following definition of array in C :
int a [ ] [2] [3]=
{
{
{1, 2, 3},
{4, 5, 6}
},
{
{10, 20, 30},
{40, 50, 60}
},
{
{100, 200, 300},
{400, 500, 600}
}
};
Which of the following expressions would give value 1 for the array defined above ?

(a)a[0] [0] [0](b)* * * a(c)* * * a[0](d)* * a[0] [0]
The correct answer is :
(1)(a) and (c)(2)(a) and (d)(3)(a) and (b)(4)(c) and (d)

1 Answer

0 votes
answered Feb 11, 2018 by Vamsi Alla (150 points)
3. (a) and (b) as the first element can be obtained using the form

***(a+0) which is nothing but ***a and obviously a[0][0][0].
Welcome to OnlineGDB Q&A, where you can ask questions related to programming and OnlineGDB IDE and and receive answers from other members of the community.
...