कम्प्युटर र सूचना प्रविधि (प्राविधिक)
कम्प्युटर र सूचना प्रविधि (प्राविधिक)
Computer & IT (Technical) · ५,०७६ प्रश्न
५,०७६ प्रश्न उपलब्ध। मोड छान्नुहोस्:
कम्प्युटर र IT: प्रश्न र उत्तर
सही लागेको विकल्पमा थिच्नुहोस्। सही भए हरियो, गलत भए रातो देखिन्छ; ३ सेकेन्डपछि सही उत्तर र व्याख्या देखिन्छ।
सही: ० / ०
-
In C++, two overloads void f(int) and void f(double) exist. Which one is called by f(3.0f)?
सही उत्तर: ख) f(double)
float to double is a floating-point promotion, which ranks better than the float to int conversion.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
In C++, class C has static int n = 0 and its constructor does n++. After the declaration C a, b[3]; what is the value of C::n?
सही उत्तर: ख) 4
One object a and three array elements are constructed, and all share the single static counter, so n = 4.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
In C++, class A prints "A" in its constructor and "a" in its destructor; class B : public A prints "B" and "b". What is printed when a B object is created and then goes out of scope?
सही उत्तर: ग) ABba
Constructors run base first (A then B), and destructors run in the reverse order (B then A).
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
What is the output of the Python code: print([1, 2, 3] * 2 == [1, 2, 3, 1, 2, 3]) ?
सही उत्तर: घ) True
Multiplying a list by an integer repeats its elements; it does not multiply each element.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
What is the output of the Python code: print(10 // 3 * 3 + 10 % 3) ?
सही उत्तर: क) 10
10 // 3 is 3, so 3 * 3 + 1 = 10; for integers (a // b) * b + a % b always equals a.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
What is the output of the Python code: print('Kathmandu'.find('a', 2)) ?
सही उत्तर: क) 5
The second argument tells find() where to start searching; the first 'a' at or after index 2 is at index 5.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
What is the output of the Python code: print(sorted('cab', reverse=True)) ?
सही उत्तर: ख) ['c', 'b', 'a']
sorted() works on any iterable and always returns a list; reverse=True sorts in descending order.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
What is the output of the Python code: print(str(12) * 2, int('12') * 2) ?
सही उत्तर: ग) 1212 24
Multiplying a string repeats it, while multiplying an integer is arithmetic.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
What is the output of the Python code: print(bool([]), bool([0])) ?
सही उत्तर: घ) False True
An empty list is falsy, while a list containing one element (even 0) is non-empty and therefore truthy.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
What is the output of the Python code: t = (1, 2, [3]); t[2].append(4); print(t) ?
सही उत्तर: घ) (1, 2, [3, 4])
The tuple itself cannot change, but the list it holds is mutable and can be modified in place.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
यी अभ्यास प्रश्न हुन्, आधिकारिक प्रश्न होइनन्। पाठ्यक्रम, विज्ञापन र नतिजाका लागि सम्बन्धित निकायको आधिकारिक वेबसाइट हेर्नुहोस्। उत्तरमा गल्ती भेटे प्रश्नमुनिको "टिप्पणी / गल्ती रिपोर्ट" मा लेख्नुहोस्।
नमस्ते! पाठ्यक्रम, सामान्य ज्ञान, भाषा परीक्षा वा कुनै प्रश्नको उत्तर बुझ्न सोध्नुहोस्।
AI ले गल्ती गर्न सक्छ। महत्वपूर्ण कुरा आधिकारिक स्रोतमा जाँच्नुहोस्।