Question 39Asked in Bihar STET 2025 Paper II Computer Science, 3 Nov 2025, Shift 1 (9:00 AM)

Consider the statements given below and then choose the correct output from theनीचे दिए गए स्‍टेटमेंट्स (Statements) पर विचार कीजिए और फिर दिये गये विकल्‍पों से सही आउटपुट

Consider the statements given below and then choose the correct output from the given options : def Change (N) : N=N+10 print (N , end= '$$ ' ) N=15 Change (N) print (N)
नीचे दिए गए स्‍टेटमेंट्स (Statements) पर विचार कीजिए और फिर दिये गये विकल्‍पों से सही आउटपुट (Output) चुनिये : def Change (N) : N=N+10 print (N , end= '$$ ' ) N=15 Change (N) print (N)
  1. A25$$1525$$15
  2. B15$$2515$$25
  3. C25$$2525$$25
  4. D2525$$2525$$
Show answerHide answer

Correct answer: (A) 25$$1525$$15

Explanation

Inside Change, the local N becomes 25 and is printed followed by "$$". The integer is passed by object reference and is immutable, so the global N stays 15, giving 25$$15.Change के भीतर लोकल N 25 हो जाता है और "$$" के साथ प्रिंट होता है। पूर्णांक object reference से जाता है और अपरिवर्तनीय (immutable) है, इसलिए ग्लोबल N 15 ही रहता है, और आउटपुट 25$$15 है।

From Bihar STET 2025 Paper II Computer Science PYQ, 3 Nov 2025, Shift 1 (9:00 AM)

This is question 39 of Bihar STET 2025 Paper II Computer Science PYQ, 3 Nov 2025, Shift 1 (9:00 AM). See all questions of this paper with answers, or attempt the paper as a timed online test to get your score and all-India rank.