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

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

What will be the output of the following code?


x=10
y=5
x,y=y,x
print(x,y)

A
10 5
B
5 10
C
15 10
D
Error
Explanation
  • Initially: x = 10, y = 5

  • x, y = y, x swaps the values of x and y

  • So now: x = 5, y = 10

  • Output: 5 10


हिंदी में:

  • शुरू में: x = 10, y = 5

  • फिर x, y = y, x से दोनों की values आपस में बदल जाती हैं

  • अब: x = 5, y = 10

  • इसलिए output होगा: 5 10

Correct Answer: B) 5 10

Latest Updates