Explanation of Solution
Determine the address of the entry in the third row and fourth column:
An array with six rows and eight columns is stored in row major order starting at address 20 (base ten). That means the first row of array stores into the memory’s location at 20.
In row major order method, the array is stored into the memory’s location by arranging sequentially row by row.
The formula to find the address of element at third row and fourth column is given below, when each entry in the array requires only one memory cell.
Substitute 3 for
Therefore, the address of the entry in third row and fourth column is “39” when each entry requires only one memory cell
Want to see the full answer?
Check out a sample textbook solutionChapter 8 Solutions
EBK COMPUTER SCIENCE: AN OVERVIEW
- There is a close association between pointers and arrays. Recall that an array variable is actually a pointer variable that points to the first indexed variable of the array. Array elements can be accessed using pointer notation as well as array notion. One problem with static arrays is that we must specify the size of the array when we write the program. This may cause two different problems: (1) we may create an array much larger than needed; or (2) we may create one that is smaller than what is needed. In general, this problem is created because we do not know the size of the array until the program is run. This is where dynamic arrays can be used. The new expression can be used to allocate an array on the freestore. Since array variables are pointer variables, you can use the new operator to create dynamic variables that are arrays and treat these dynamic array variables as if they were ordinary arrays. Array elements can also be accessed using pointer notation as well as array…arrow_forwardAn array T[-1.35][-2.15] is stored in the memory along the row with each element occupying 4 bytes. Find out the base address and address of element T[2O][5], if an element T[2][2] is stored at the memory location 300O. Find the total number of elements stored in T and number of bytes allocated to T.arrow_forwardWrite a PEP/8 machine language simulator that simulates the PEP/8 computer and instruction set for only the following instructions Here are some specifics. 1. Use an array to represent the memory. 2. Use variables or arrays for the PEP8 registers. I recommend putting it all into a structure. I also recommend using an array of 16 bit values for A, X, PC, SP so that you can use the r bit from the instructions to point directly to A or X. You do NOT have to include the Status bits. 3. Use unions of structures to break up the registers and instructions into the correct bits (for example, use a structure that can be unioned to break up the 8 bit specifier into the following bit combos (4, 1, 3), (5, 3), (7, 1), (8). This will allow you to instantly extract the instruction, register and addressing modes from each instruction. Also use a union to break up the 16 bit operand into two 8 bit values. 4. Have the instructions be inputted either through the command line or better yet,…arrow_forward
- in c++ 6. Consider a 2D array A[m][m], each element takes 4 bytes of storage. If the base address at A[1][1] is 1500 and the address of A[4][5] is 1608, determine the order of the matrix when it is stored in Column Major Wise.arrow_forwardSub: Data structure Suppose a multidimensional array is declared as A [1...8, - 5...5, -10...5]. If base address of A is 400 and there are 4 words per memory location, then the address of A[3, 3, 3] by using ww column major order isarrow_forward02. Suppose a multidimensional array is declared as A [1..8, -5..5, -10.....5]. If base address of A is 400 and there are 4 words per memory location, then the address of A[3, 3, 3] by using column major order isarrow_forward
- Execute the following using Array Implementation. Use diagrams in showing your final answer c. INSERT(Alice,1,L) INSERT(Bob,2,L) INSERT(Kare,3,L) INSERT(Ram,4,L) DELETE(2,L) What will happen to your array?arrow_forwardCreate a BST implementation that uses three arrays to represent the BST: a key array, a left and right array indices array, and a right array indices array. The constructor's maximum size should be preallocated to the arrays. Compare your program's effectiveness to that of a typical implementation.arrow_forwardUsing pointers. C language. Can i have typewritten answer? Thank you.arrow_forward
- Please solve quickly with matlabarrow_forwardGiven that X is a double number array starting at location 100, ptr is a pointer to X, and each double is stored in 8 bytes of memory, what location does ptr + 1 point to? 100 101 1004 108arrow_forwardThe benefits of arrays may be summarised as follows: When it comes to arrays, the maximum number of dimensions is What is the difference between a structure and a simple value? An example of a complex data structure would be helpful.arrow_forward
- Systems ArchitectureComputer ScienceISBN:9781305080195Author:Stephen D. BurdPublisher:Cengage Learning