Problem

Solutions For C++ Plus Data Structures Chapter 2 Problem 13E

Step-by-Step Solution

Solution 1

Three-dimensional array: In 3-d array, each element is accessed using three subscripts.

For example:

int asdf[3][2][3], defines an array asdf that contains 3*2*3= 18 elements.

It is also called an array of arrays of arrays.

a.

Three-dimensional array at logical level can be declared as follows:

int cube[1][2][2];

The above declared 3-d array named cube is of int type that contains 4 elements.

Three dimensional arrays are like a graph with x, y, z axis.

b.

Three dimension arrays can be used in various fields. Some of the vast applications of 3-d array are as follows:

3-D modelling: 3-D array is used to develop the mathematical representations of 3-d objects.

Real world applications: 3-D array is used real life applications. For example, view of a home in 3-dimensions.

Games: 3-D array is used in gaming applications to give the real look to objects of games. Because third dimension gives an extra view to the viewer.

Graphics and designing: 3-D arrays are used in many designing software.

Add your Solution
Textbook Solutions and Answers Search
Solutions For Problems in Chapter 2