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

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


Please Help Members By Posting Answers For Below Questions

Explain how functions are classified in C++ ?

1192


Write a program that takes a 5 digit number and calculates 2 power that number and prints it.

2545


What is command line arguments in C++? What are its uses? Where we have to use this?

1208


Is c++ slower than c?

995


What is set in c++?

1083


What are the differences between malloc() and calloc()?

1126


What is constant in c++ with example?

1100


What do you mean by delegate? Can a user retain delegates?

894


What is the rule of three?

960


How does a copy constructor differs from an overloaded assignment operator?

984


What are the methods of exporting a function from a dll?

1168


Which of the following is evaluated first: a) && b) || c) !

2324


What is using namespace std in cpp?

1091


What are punctuators in c++?

1107


What does new do in c++?

1034