1
You visited us
1
times! Enjoying our articles?
Unlock Full Access!
Byju's Answer
Standard VI
Mathematics
Cardinality
Consider on a...
Question
Consider on array arr[0 .... 10] which is of character type and occupies 2 byte memory each, then what would be the address of the element arr[7].
Note : Consider first value is stored at 50.
Open in App
Solution
We know :
A[i] = B.A. + (i - start index)
×
size
Here, B.A. = 50
i = 7, size = 2 bytes,
start index = 0
A[7] = 50 + (7 - 0)
×
2
= 50 + 14
= 64
A[7] = 64.
Suggest Corrections
0
Similar questions
Q.
Let a 2 - D array declaration be char Arr[100][100] store data such that the base address of the array is 0. Additionally, considering the array to be byte addrassable, what would be the address of element stored at arr[20][30].
Q.
Consider a
n
×
n
lower triangular matrix, which is stored in row major order where each element occupies s bytes of memory space, then the address of an element A[i][j] can be given as
Q.
Consider the following declaration of a two-dimensional array in C
char a[100][100];
Assuming that the main memory is byte-addressable and that the array is stored starting form memory address 0, the address of a[40][50] is
Q.
Consider a two dimensional array A[20][10]. Assume 4 words per memory cell, the base address of array A is 100, elements are stored in row-major order and first element is A[0][0].What is the address of A[11][5]?
Q.
Given a 2-D array A[-20 .... 10, 8 ..... 16] where the starting location is 20. Consider that the memory space occupied by the array is 4 bytes and stored is row-major order. What is the location of A[4][16]?
View More
Join BYJU'S Learning Program
Grade/Exam
1st Grade
2nd Grade
3rd Grade
4th Grade
5th Grade
6th grade
7th grade
8th Grade
9th Grade
10th Grade
11th Grade
12th Grade
Submit
Related Videos
Sets and Their Representations
MATHEMATICS
Watch in App
Explore more
Cardinality
Standard VI Mathematics
Join BYJU'S Learning Program
Grade/Exam
1st Grade
2nd Grade
3rd Grade
4th Grade
5th Grade
6th grade
7th grade
8th Grade
9th Grade
10th Grade
11th Grade
12th Grade
Submit
Solve
Textbooks
Question Papers
Install app