Computers and Technology
Given a constant named size with a value of 5, which statement can you use to define and initialize an array of doubles named gallons with 5 elements? a. double gallons[size] = { 12.75, 14.87, 9.74, 6.99, 15.48 }; b. double gallons[size] { 12.75, 14.87, 9.74, 6.99, 15.48 }; c. double gallons[] { 12.75, 14.87, 9.74, 6.99, 15.48 }; d. all of the above e. a and b only
Select the pseudo-code that corresponds to the following assembly code. Assume that the variables a, b, c, and d are initialized elsewhere in the program. You may want to review the usage of EAX, AH, and AL (IA32 registers). Also recall that the inequality a > b is equivalent to b < a. i.e. If A is greater than B, that's equivalent to saying that B is less than A..data; General purpose variablesa DWORD ?b DWORD ?c BYTE ?d BYTE ?upperLevel DWORD 18lowerLevel DWORD 3; Stringsyes BYTE "Yes",0no BYTE "No",0maybe BYTE "Maybe",0code main PROC mov eax, 1 cmp AH, c jg option1 jmp option3option1: mov edx, OFFSET yes call WriteString jmp endOfProgramoption2: mov edx, OFFSET no call WriteString jmp endOfProgramoption3: mov edx, OFFSET maybe call WriteStringendOfProgram: exitmain ENDPEND maina) if (c > 0) print (yes);else print (maybe);b) if (c < 0) print (yes);else print (maybe);c) if (c < 1) print (yes);else print (maybe);d) if (c > 1) print (yes);else print (maybe);