+ 3

Can anyone explain this c code in brief?

#include <stdio.h> int main() { int a[2][3][2] = {{{1,2},{9,8},{3,7}}, {{2,2},{1,4}, {5,4}}}; printf("%d %d %d", a[1]-a[0], a[1][0]-a[0][0], a[1][0][0] - a[0][0][0]); return 0; }

18th Nov 2019, 5:02 PM
Preity
Preity - avatar
13 ответов
+ 3
Oh. I just guessed without checking , to get notified by swim answer.. I know how to find but not 100% sure.. btw Priety tq...
18th Nov 2019, 7:02 PM
Jayakrishna 🇮🇳
+ 3
~ swim ~ So in that case, is a[1][0] will giving its address? To point out value, can we need to mention full like a[1][0][0]..?
18th Nov 2019, 7:19 PM
Jayakrishna 🇮🇳
+ 3
~ swim ~ Ok. Can you specify a example in this case?
18th Nov 2019, 7:41 PM
Jayakrishna 🇮🇳
+ 3
~ swim ~ OK. Thats why i mentioned 2 cases in last post.. Asking one for address, one for value, but your answer mentioning about dereferencing pointer confused me.. Sry for trobling.. Thank you..
18th Nov 2019, 7:52 PM
Jayakrishna 🇮🇳
+ 3
~ swim ~ Yes. Which is same as a[1][0][0].. Tq..
18th Nov 2019, 8:18 PM
Jayakrishna 🇮🇳
+ 3
19th Nov 2019, 9:50 AM
Preity
Preity - avatar
+ 2
~ swim ~ can you please explain this code snippet
18th Nov 2019, 6:20 PM
Preity
Preity - avatar
+ 2
Answer: 1,8,1 am not sure, waiting for swim answer....
18th Nov 2019, 6:51 PM
Jayakrishna 🇮🇳
+ 2
Jaya krishna output is 361
18th Nov 2019, 6:59 PM
Preity
Preity - avatar