...
Programming
October 12, 2023
Programming-for-Output-Problems
October 12, 2023
Programming
October 12, 2023
Programming-for-Output-Problems
October 12, 2023

Programming

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;  
A
Theory Explanation.
Correct Answer: A

Leave a Reply

Your email address will not be published. Required fields are marked *