What is the output of the following 3D Array
int arr[3][2][2]={1,2,3,4,5,6,7,8,9,10,11,12};
what is the output for arr[2][1][0]?
Answer Posted / zohaib brohi
the output will be 11..
first we should make it simple.
just make all the values in that array of 2x2 in 3 block like
1,2,
3,4,
5,6,
7,8,
9,10,
11,12
now we have to find [2][1][0]. it means that the value is in
3rd block becoz array starts from 0, then [1][0] means 1st
value of 2nd row.. so thats 11.
| Is This Answer Correct ? | 112 Yes | 9 No |
Post New Answer View All Answers
What is a far pointer? where we use it?
What are the advantages of pointers?
How one would use switch in a program?
What are the defining traits of an object-oriented language?
Explain the isa and hasa class relationships.
Why can templates only be implemented in the header file?
When should I use unitbuf flag?
What does it mean to declare a destructor as static?
What is the full form of ios?
What is the difference between ++ count and count ++?
What language is a dll written in?
How many namespaces are there in c++?
What is token c++?
What is virtual base class?
Are there any special rules about inlining?