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

निम्नलिखित का आउटपुट क्या है?

What is the output of the following ?

m = 0
while m < 5:
       print(m)
       m += 1
       if m == 3:
             break
        else:
             print(0)
A)
B)
C)
D)

Explanation:

Here’s how the code works:

  • First iteration: Prints 0, then 0 again (since m != 3).
  • Second iteration: Prints 1, then 0 again.
  • Third iteration: Prints 2, then the loop stops because m == 3.

Output: 0 0 1 0 2

Answer: (C) 0 0 1 0 2

Latest Updates