Exercise: Microprocessors

Questions for: Microprocessors

Assuming that k is an integer what would the result of following expression in C
k = 2* 3 / 5 + 4 / 4 + 8 - 2 - 4 / 8
A:
8
B:
7
C:
7.5
D:
zero
Answer: A

k = 1 + 1 + 8 - 2 - 0 = 8 because k is an integer.

Let the initial contents of ACC and CY in 8085 be
  1. CY = 1
  2. ACC = 10000001
After the instruction RAL is executed twice the contents of CY and ACC respectively will be
A:
1 and 00000011
B:
0 and 00000111
C:
1 and 00000111
D:
0 and 00000011
Answer: B

RAL means 'rotate left through carry'.

Consider the following program in Basic

10 READ X, Y, Z
15 DATA 20, 30, 10
20 S = X + Y + Z
30 A = S/3
35 PRINT S, A, X, Y, Z
40 END


The output will be
A:
60, 20, 20, 30, 10
B:
10, 30, 20, 20, 60
C:
60, 20, 30, 10, 20
D:
60, 30, 10, 20, 20
Answer: A

.

Consider the following library functions
  1. EXP (i.e., ex)
  2. ARCTAN (i.e. tan-1 x)
  3. SQRT (i.e., x)
  4. AES (i.e. |x|)

Which of the above are allowed in Pascal?
A:
All
B:
1 and 3 only
C:
1, 3, 4 only
D:
1, 2 and 3 only
Answer: A

All are allowed in Pascal.

If F = 95.0 what will be the result of following FORTRAN 77 program?

REAL F , C
READ * , F
C = (5. / 9.) * (F - 32.)
A:
35.0
B:
35
C:
25.0
D:
25
Answer: A

(95 - 32) and decimal must be added.

Ad Slot (Above Pagination)
Quiz