🚀 Hurry! Offer Ends In
00 Days
00 Hours
00 Mins
00 Secs
Enroll Now
X

निम्नलिखित छद्म कोड का आउटपुट क्या होगा?

What will be the output of the following pseudo-code ?

Integer a
     Set a = 4
Do
     print a + 2
    a = a- 1
while (a not equals 0)
end while
A)
B)
C)
D)

Explanation:

Sure!

  • The loop starts with a = 4 and prints a + 2.
  • In each iteration, a decreases by 1 until a reaches 0.
  • The printed values are: 6 (4 + 2), 5 (3 + 2), 4 (2 + 2), and 3 (1 + 2).

Answer: (B) 6 5 4 3.

Latest Updates