Given
int arr[3][4][2] = {{{2,4},{7,8},{3,4},{5,6}}, {{7,6},{3,4},{5,3},{2,3}}, {{8,9},{7,2},{3,4},{5,1}}};
Which one of the following can be used to refer to the element 1 in the above 3-D array?
Pick an option to check yourself, or open the answer below.
Show answer & explanation
Correct answer: B. *(*(*(arr + 2) + 3) + 1)
Explanation
The value 1 is arr[2][3][1] (last pair {5, 1}), which is *(*(*(arr + 2) + 3) + 1).More Programming Languages and Computer Graphics questions
- Allowing different derived classes to be used interchangeably through the interface provided by a common base class is called ______
- In a ______ curve the first and last vertices of the control polygon lie on the curve, and all other vertices define the derivatives, order…
- Inheritance provides the benefits of A. Shared interfaces B. Run-time polymorphism C. Less redundant information D. Dynamic binding Choose…
- Which of the following are correct uses of std::string constructors? A. string s1; B. string s2(s1); C. string s3{7}; D. string s4{'a'}; E.…
- A corporate website's appearance varies according to the department that owns the documents, but all documents follow the corporate look an…
- Match List I with List IIList I List II A. 2-D Array Input I. Liquid Crystal Display B. Transmissive device II. Flat-bed scanner C. Binary…