Question
1.
2.
3.
4.
Answer (Detailed Solution Below)
Option 1 : 1052
Advertisement
Detailed Solution
सही उत्तर 1052 है।
Key Points
Helpful?
Question:
An integer array int a[4][5] is stored row-major starting at address 1000, with each int occupying 4 bytes. What is the address of a[2][3]? / पूर्णांक ऐरे int a[4][5] पंक्ति-प्रमुख (row-major) क्रम में पते 1000 से संग्रहित है, प्रत्येक int 4 बाइट लेता है। a[2][3] का पता क्या है?
1.
1052
2.
1056
3.
1048
4.
1060
Correct Answer: 1052
In row-major order, a[2][3] is the (2 x 5 + 3) = 13th element (0-indexed), so its address is 1000 + 13 x 4 = 1052. / पंक्ति-प्रमुख क्रम में a[2][3], (2 x 5 + 3) = 13वाँ एलिमेंट (0-सूचकांकित) है, अतः इसका पता 1000 + 13 x 4 = 1052 है।
Downloaded from PrepSnap (prepsnap.in)