All mock tests are FREE till 31 December — register to save your progress
Unit 3 · Programming Concepts & Python HTET 2022 PGT Computer Science

In C++, an overloaded unary operator defined as a member function requires how many variables to be passed as function argument ?

C++ में, सदस्य फलन के रूप में परिभाषित एक ओवरलोडेड युनरी ऑपरेटर को फंक्शन आर्ग्युमेंट के तौर पर कितने चर पास किये जाने की आवश्यकता होगी ?

Pick an option to check yourself, or open the answer below.

Show answer & explanation

Correct answer: A. Zeroशून्य

Explanation

A unary operator overloaded as a member function takes no argument — the operand is the calling object (this). As a friend function it would take one.

सदस्य फलन के रूप में ओवरलोड किया गया युनरी ऑपरेटर कोई आर्ग्युमेंट नहीं लेता; ऑपरेंड स्वयं ऑब्जेक्ट (this) होता है। फ्रेंड फलन में एक आर्ग्युमेंट लगता है।

More Programming Concepts & Python questions