The Gateway to Computer Science Excellence
First time here? Checkout the FAQ!
x
0 votes
198 views

Translate the executable statements of the following Pascal Program into quadruples. Assume that integer and real values require four words each.

repeat
            flag[i]:=true;
        while turn !=i
        do begin
        while flag[j] do skip
        turn:=i;
        end
        
        critical section
        
        flag[i]:=false;
    until false
    Program Test;
    var i:integer;
        a: array [1...10] of real;
    begin   i:=0;
            While   i:<=10 do
                begin
                    a[i]:=0;
                    i:=i+1
            end;
    end.

 

asked in Compiler Design by Veteran (98.9k points) | 198 views

1 Answer

0 votes
Can they still ask Pascal Program questions?
answered by Junior (645 points)


Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true

34,850 questions
41,833 answers
119,100 comments
41,454 users