Question 21
Consider an integer array declared as 'int A[10] = {42, 63, 21, 26};'. What is the value of '*(A + 2) + A[1]'?
Detailed Solution
*(A + 2) accesses element A[2] which equals 21. A[1] equals 63. Therefore, 21 + 63 = 84.
Free Practice / PYQ
Consider an integer array declared as 'int A[10] = {42, 63, 21, 26};'. What is the value of '*(A + 2) + A[1]'?
*(A + 2) accesses element A[2] which equals 21. A[1] equals 63. Therefore, 21 + 63 = 84.
Consider an integer array declared as 'int A[10] = {44, 66, 22, 27};'. What is the value of '*(A + 2) + A[1]'?
*(A + 2) accesses element A[2] which equals 22. A[1] equals 66. Therefore, 22 + 66 = 88.
Consider an integer array declared as 'int A[10] = {46, 69, 23, 28};'. What is the value of '*(A + 2) + A[1]'?
*(A + 2) accesses element A[2] which equals 23. A[1] equals 69. Therefore, 23 + 69 = 92.
Consider an integer array declared as 'int A[10] = {48, 72, 24, 29};'. What is the value of '*(A + 2) + A[1]'?
*(A + 2) accesses element A[2] which equals 24. A[1] equals 72. Therefore, 24 + 72 = 96.
Consider an integer array declared as 'int A[10] = {50, 75, 25, 30};'. What is the value of '*(A + 2) + A[1]'?
*(A + 2) accesses element A[2] which equals 25. A[1] equals 75. Therefore, 25 + 75 = 100.