Daily Quizzes
Mock Tests
Download MCQs Free PDF
Question
Computer Knowledge

Consider a two dimensional character array A [1:5,2:7]. Assuming row major order of storage determine the address of element A[2][3] if base address is 500.

501

506

507

508

एक टू-डायमेंशनल कैरेक्टर ऐरे A [1:5,2:7] पर विचार करें। स्टोरेज के 'रो-मेजर ऑर्डर' (row-major order) को मानते हुए, यदि बेस एड्रेस 500 है, तो एलिमेंट A[2][3] का एड्रेस पता करें।

501

506

507

508

View Answer & Solution
Correct Answer: C (507)
Detailed Solution:

Key Points

  • Row-major order means elements are stored row-wise.
    • In row-major order, the address of an element A[i][j] in a 2D array can be calculated using the formula:
    • Address(A[i][j]) = Base_Address + [(i - Starting_Row) * Number_of_Columns + (j - Starting_Column)]

मुख्य बिंदु

• रो-मेजर ऑर्डर का मतलब है कि एलिमेंट्स को रो (row) के अनुसार स्टोर किया जाता है।

o रो-मेजर ऑर्डर में, 2D ऐरे में किसी एलिमेंट A[i][j] का एड्रेस इस फ़ॉर्मूले का उपयोग करके निकाला जा सकता है:

o Address(A[i][j]) = Base_Address + [(i - Starting_Row) * Number_of_Columns + (j - Starting_Column)]

India’s #1 Learning Platform
Start Complete Exam Preparation
Daily Live MasterClasses
Practice Question Bank
Mock Tests & Quizzes
Trusted by 8.1 Crore+ Students

Exam Preparation Simplified

Learn Practice Analyse Improve
Get Started Free
Download the App

Trusted by 8.1 Crore+ Students

Enquire Now

Please share a few details to view the answer and solution.

×
Illustration of two people having a discussion

We're Here for You! Get in Touch with Class24 for All Your Needs!

Disclaimer: Your privacy is important to us. We will not share your information with third parties.