What would be the equivalent pointer expression for referring the array element ar[m][n][0]?
Pick an option to check yourself, or open the answer below.
Show answer & explanation
Correct answer: D. *(*(*(ar + m) + n) + 0)
Explanation
a[i] is *(a + i). Applying this three times: ar[m] = *(ar + m), ar[m][n] = *(*(ar + m) + n), and ar[m][n][0] = *(*(*(ar + m) + n) + 0).More Programming Languages and Computer Graphics questions
- Which of the following techniques is used for Clipping?
- Consider the following piece of C programming code:int x=128, y=110; do { if(x>y) x=x-y; else y=y-x; } while(x!=y); printf("%d",x); Which o…
- Match List I with List IIList I List II A. Overloading I. Since function call is resolved during run time, the execution is slow. B. Early…
- Consider the following statements for XML (Extensible Markup Language): A. The number of tags decreases and users can define their own tags…
- Match List I with List IIList I List II A. Oblique Projection I. When the direction of projection is so chosen that the lines perpendicular…
- What will be the output of the following C programming code:void main() { int *i, a=12, b=2, c; c = (a=a+b, b=a/b, a=a*b, b=a-b); i = &c; p…