Exercises 5.1 The member of Two-dimensional array M is the string which has 6 ch
ID: 3874967 • Letter: E
Question
Exercises 5.1 The member of Two-dimensional array M is the string which has 6 characters (Each character occupies one byte). The range of row subscript i is from 0-8. The range of column subscript i is from 1- 10 (1) How many bytes are required at least to store M? 2) How many bytes does column 8 and row 5 occupy in M? (3) IfM is stored in a row priority, is the starting address of the element M[8][5] consistent with the starting address of that element stored in a column priority Exercises 5.2 In C language, most storage structures are based on row- scquential and row/column are indexed from zcro. Define an integer array A[9][3][5], the first element address is100. Each integer occupies 4 bytes. Then calculate memory address of the following elements (I)A[oj[oj[o] (2)1][1][1] (4)A(81214]Explanation / Answer
Here are the answers, do give me a thumbs up if this helps!
5.1 (1) Atleast 7 bytes, as 6 are used to stor ethe characters and the 7th one being the null terminator
(2) It occupies one byte
(3) No, it will nto eb the same as in column priority
5.2 (1)100
(2) 100+4*(9+3+1) = 152
(3) 100+4*(27+3+2) = 224
(4) 100+4*(72+6+4)=428
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.