CS271 - WEEK 8 - Summary Excersizes

Lakukan tugas rumah & ujian kamu dengan baik sekarang menggunakan Quizwiz!

Suppose that you are given the following partial data segment, which starts at address offset 0x1000 : .data idArray WORD 3546, 1534, 12, 3481, 154, 6423 x DWORD LENGTHOF idArray y DWORD SIZEOF idArray z DWORD TYPE idArray What is the hexadecimal OFFSET of the number "12" in idArray?

0x1004

Assume that your program has access to the following data segment (starting at address 0x310): .data id DWORD 7 matrix WORD 50 DUP(10 DUP(?)) What is the hexadecimal address of matrix[7][3] (the 4th element of the 8th row)

0x3A6

Suppose that you are given the following partial data segment, which starts at address offset 0x1000 : .data idArray WORD 3546, 1534, 12, 3481, 154, 6423 x DWORD LENGTHOF idArray y DWORD SIZEOF idArray z DWORD TYPE idArray y contains what value, in decimal? (Ignore the .0000 from Canvas)

12.0

Given the following array declaration, how many bytes of memory does array matrix require? (in decimal - ignore the .0000 from Canvas) .data matrix WORD 21 DUP(38 DUP(?))

1596

Suppose that you are given the following partial data segment, which starts at address offset 0x1000 : .data idArray WORD 3546, 1534, 12, 3481, 154, 6423 x DWORD LENGTHOF idArray y DWORD SIZEOF idArray z DWORD TYPE idArray x contains what value, in decimal? (Ignore the .0000 from Canvas)

6.0

Which of the following FPU manipulations corresponds to the given infix notation? Z = (A + B - C) / D * E A.) finit fld A fld B fadd fld C fsub fld D fmul fld E fdiv fstp Z B.) finit fld A fld B fadd fld C fsub fld D fdiv fld E fmul fstp C.) finit fld A fld B fsub fld C fadd fld D fdiv fld E fmul fstp Z D.) finit fld A fld B fadd fld C fsub fld D fdiv fld E fmul fstp Z

D.) finit fld A fld B fadd fld C fsub fld D fdiv fld E fmul fstp Z

Which of the following postfix expressions corresponds to the given infix expression? 1 + 2 * (4 - 2) / 4 ^ (1 + 1) A.) 1 2 4 2 - * 4 / 1 1 + ^ + B.) 1 2 + 4 2 - * 4 1 1 + ^ / C.) 1 2 4 2 - * 4 1 ^ 1 + / + D.) 1 2 4 2 - * 4 1 1 + ^ / +

D.) 1 2 4 2 - * 4 1 1 + ^ / +

2-dimensional arrays (matrices) are declared in _________ order in MASM. A.) column-major B.) direct C.) inverse D.) row-major

D.) row-major

The _________ operator returns a count of the number of elements in a single data declaration. A.) OFFSET B.) SIZEOF C.) TYPE D.) PTR E.) LENGTHOF

E.) LENGTHOF

The _________ operator overrides the default type of a label (variable), and can also be used to combine elements of a smaller data type and move them into a larger operand. A.) OFFSET B.) TYPE C.) SIZEOF D.) LENGTHOF E.) PTR

E.) PTR

Loading a string byte using string primitives increments or decrements which register? A.) ESI B.) EDI C.) ESP D.) EDX

A.) ESI

Which of the following infix expressions corresponds to the given postfix expression? 4 5 + 5 ^ 3 4 / - A.) (4 + 5) ^ 5 / 3 - 4 B.) (4 + 5) ^ (5 - 3) / 4 C.) (4 + 5) ^ 5 - 3 / 4 D.) 4 + 5 ^ 5 - 3 / 4

C.) (4 + 5) ^ 5 - 3 / 4

The _________ operator returns the size, in bytes, of a single element of a data declaration. A.) SIZEOF B.) OFFSET C.) TYPE D.) PTR E.) LENGTHOF

C.) TYPE


Set pelajaran terkait

Chapter 11 Additional Test Questions

View Set

Netflix Will Have To Be More Careful Raising Prices

View Set

Chapter 20: Management of Anger, Aggression, and Violence

View Set