Programming
October 12, 2023Programming-for-Output-Problems
October 12, 2023Programming
| Question 5 |
Consider the following high level program segment. Give the contents of the memory locations for variables W, X, Y and Z after the execution of the program segment. The values of the variables A and B are 5 CH and 92H, respectively. Also indicate error conditions if any.
var
A, B, W, X, Y :unsigned byte;
Z :unsigned integer, (each integer is represented by two bytes)
begin
X :=A+B
Y :=abs(bA-b);
W :=A-B
Z :=A*B
End; | Theory Explanation. |
Correct Answer: A
