प्रोग्रामिङ – Programming MCQ
प्रोग्रामिङ – कम्प्युटर र IT
Programming · Computer & IT (Technical) · १,५६५ प्रश्न
१,५६५ प्रश्न उपलब्ध। मोड छान्नुहोस्:
प्रोग्रामिङ: प्रश्न र उत्तर
सही लागेको विकल्पमा थिच्नुहोस्। सही भए हरियो, गलत भए रातो देखिन्छ; ३ सेकेन्डपछि सही उत्तर र व्याख्या देखिन्छ।
सही: ० / ०
-
Which of the following operators cannot be overloaded in C++?
सही उत्तर: क) scope resolution (::)
The scope resolution operator ::, along with ., .*, ?: and sizeof, cannot be overloaded.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
In C++, class members declared as protected are accessible:
सही उत्तर: क) within the class and in its derived classes
protected members behave like private to outside code but remain accessible to derived classes.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
A constructor that initialises a new object using another existing object of the same class is called a:
सही उत्तर: ग) copy constructor
A copy constructor has the form ClassName(const ClassName &obj).
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
In C++, the operator :: is known as the:
सही उत्तर: ख) scope resolution operator
The :: operator specifies the scope, e.g. ClassName::function or ::globalVar.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
In C++, a static data member of a class:
सही उत्तर: घ) is shared by all objects of the class
Only one copy of a static data member exists, common to every object of the class.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
In C++, the 'this' pointer inside a member function points to:
सही उत्तर: ख) the object that invoked the member function
this is an implicit pointer to the current (calling) object.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
In C++, a non-member function that is allowed to access the private members of a class is called a:
सही उत्तर: ख) friend function
A class grants such access by declaring the function with the friend keyword.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
In C++, a member function declared as virtual void show() = 0; is called a:
सही उत्तर: ग) pure virtual function
The = 0 makes it a pure virtual function, which makes the class abstract.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
In C++, the 'diamond problem' of multiple inheritance (duplicate copies of a common base class) is solved by using:
सही उत्तर: क) virtual base classes (virtual inheritance)
Declaring the common base as virtual ensures only one shared copy of it exists in the most-derived object.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
When several derived classes inherit from a single base class, the inheritance is called:
सही उत्तर: ख) hierarchical inheritance
One base class with many child classes forms a hierarchy, i.e. hierarchical inheritance.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
यी अभ्यास प्रश्न हुन्, आधिकारिक प्रश्न होइनन्। पाठ्यक्रम, विज्ञापन र नतिजाका लागि सम्बन्धित निकायको आधिकारिक वेबसाइट हेर्नुहोस्। उत्तरमा गल्ती भेटे प्रश्नमुनिको "टिप्पणी / गल्ती रिपोर्ट" मा लेख्नुहोस्।
नमस्ते! पाठ्यक्रम, सामान्य ज्ञान, भाषा परीक्षा वा कुनै प्रश्नको उत्तर बुझ्न सोध्नुहोस्।
AI ले गल्ती गर्न सक्छ। महत्वपूर्ण कुरा आधिकारिक स्रोतमा जाँच्नुहोस्।