Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


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]?

Answers were Sorted based on User's Feedback



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 i..

Answer / 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

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 i..

Answer / sawwas

11

Is This Answer Correct ?    52 Yes 9 No

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 i..

Answer / tushar aggarwal

11 is the output of the arr[2][1].
let it understand in a very simple manner.
if we analyze the arr[3][2][2] in a 3d style ,it would be
easy to capture the answer.
1 2
3 4

5 6
7 8

9 10
11 12
here you can see in arr[3][2][2]. there are 3 rows,of 2x2
matrix each.
now coming to the real problem we have to find arr[2][1].
since the last bracket is absent in the arr[2][1].thus we
will implement this by our self.now we may read it as
arr[2][1][0],suppose the last bracket contain 0 in it.

finallly we are ready for finding the value ,
arr[2][1][0].
here [2] = last column of the matrix,since the array is
readed as o ,1,2.
[1][0]= in the third row ,[1][0] represents the value 11.
therefore 11 is output of the arr[2][1][0].

Is This Answer Correct ?    20 Yes 4 No

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 i..

Answer / sonam

11

Is This Answer Correct ?    14 Yes 2 No

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 i..

Answer / darshil movaliya

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]?

Is This Answer Correct ?    4 Yes 0 No

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 i..

Answer / arpita

ans-0 [3][2][2]={1,2,3,4,5,6,7,8,9,10,11,12}
[2][1][0]={0}
3*2*2=12
2*1*0=0
think hatke...

Is This Answer Correct ?    9 Yes 29 No

Post New Answer

More C++ General Interview Questions

Explain linked list using c++ with an example?

0 Answers  


What is the difference between structures and unions?

0 Answers  


Differentiate between late binding and early binding. What are the advantages of early binding?

0 Answers  


What is pointer with example?

0 Answers  


You have two pairs: new() and delete() and another pair : alloc() and free(). Explain differences between eg. New() and malloc()

0 Answers  


what do you mean by memory management operators

4 Answers   HCL,


Write a program to reverse a linked list?

8 Answers   Catalytic Software, Satyam,


sizeof - is it a function or operator?

6 Answers   Honeywell,


Assume an array of structure is in order by studentID field of the record, where student IDs go from 101 to 500. Write the most efficient pseudocode algorithm you can to find the record with a specific studentID if every single student ID from 101 to 500 is used and the array has 400 elements. Write the most efficient pseudocode algorithm you can to find a record with a studentID near the end of the IDs, say in the range from 450 to 500, if not every single student ID in the range of 101 to 500 is used and the array size is only 300

0 Answers  


Can I uninstall microsoft c++ redistributable?

0 Answers  


Write a program in C++ for Fibonacci series

0 Answers   Axtria, ITC Indian Tobacco Company,


Is c++ the most powerful language?

0 Answers  


Categories