Which of the following operator evaluates to True if the variable on either side of theनिम्नलिखित में से कौन सा ऑपरेटर (Operator) True में इवैल्युएट (evaluate) होता है, यदि उस
Which of the following operator evaluates to True if the variable on either side of the
operator points towards the same memory location and False otherwise ?
निम्नलिखित में से कौन सा ऑपरेटर (Operator) True में इवैल्युएट (evaluate) होता है, यदि उस
ऑपरेटर (Operator) के दोनों तरफ के वेरिएबल (variable) समान मेमोरी स्थान (memory location)
की ओर इंगित करते हैं, अन्यथा वह Operator False में इवैल्युएट (evaluate) होता है ?
Show answerHide answer
Correct answer: (A) isis
Explanation
The "is" operator returns True when both variables refer to the same object in memory (same id()). "==" only compares values."is" ऑपरेटर तब True लौटाता है जब दोनों वेरिएबल मेमोरी में एक ही ऑब्जेक्ट (वही id()) को दर्शाते हों। "==" केवल मानों की तुलना करता है।