...
Nielit Scientist-B CS 4-12-2016
April 5, 2025
GATE 2008-IT
April 6, 2025
Nielit Scientist-B CS 4-12-2016
April 5, 2025
GATE 2008-IT
April 6, 2025

Programming

Question 50

Consider the following PASCAL program segment:

 if i mode 2 = 0 then
           while i > = 0 do
             begin
              i:=i div 2;
              if i mod 2 < > 0 do then i:=i – 1
                   else i:=i – 2
 end

An appropriate loop-invariant for the while-loop is ______

A
PASCAL is out of syllabus.
Correct Answer: A

Leave a Reply

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