प्रोग्रामिङ – Programming MCQ
प्रोग्रामिङ – कम्प्युटर र IT
Programming · Computer & IT (Technical) · १,५६५ प्रश्न
१,५६५ प्रश्न उपलब्ध। मोड छान्नुहोस्:
प्रोग्रामिङ: प्रश्न र उत्तर
सही लागेको विकल्पमा थिच्नुहोस्। सही भए हरियो, गलत भए रातो देखिन्छ; ३ सेकेन्डपछि सही उत्तर र व्याख्या देखिन्छ।
सही: ० / ०
-
What is the output of print(True + True) in Python?
सही उत्तर: क) 2
bool is a subclass of int with True equal to 1, so True + True = 2.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
What is the output of print(list(range(1, 10, 3))) in Python?
सही उत्तर: घ) [1, 4, 7]
range(1, 10, 3) starts at 1 and adds 3 while staying below 10: 1, 4, 7.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
Which built-in Python data type stores data as key-value pairs?
सही उत्तर: ख) dict
A dictionary maps unique keys to values, e.g. {'a': 1}.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
What is the output of print(len('Lok Sewa')) in Python?
सही उत्तर: क) 8
len() counts every character including the space: 3 + 1 + 4 = 8.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
In Python, after a = [1, 2] followed by a.append([3, 4]), what is len(a)?
सही उत्तर: ख) 3
append() adds its argument as a single element (the list [3, 4]); extend() would add 3 and 4 separately.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
What is the output of print(len([1, [2, 3], 4])) in Python?
सही उत्तर: क) 3
The list has three elements: 1, the nested list [2, 3], and 4.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
In Python 3, the built-in input() function returns a value of type:
सही उत्तर: ग) str
input() always returns a string; it must be converted, e.g. int(input()), for numbers.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
What does print(type(3 / 2)) show in Python 3? (angle brackets left out)
सही उत्तर: घ) class 'float'
In Python 3 the / operator always performs true division and returns a float (1.5).
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
In Java, every class directly or indirectly inherits from which class?
सही उत्तर: घ) Object
java.lang.Object is the root of the Java class hierarchy.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
Which feature allows the + operator to add numbers and also join two user-defined string objects in C++?
सही उत्तर: ख) operator overloading
Operator overloading gives an existing operator a new meaning for user-defined types.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
यी अभ्यास प्रश्न हुन्, आधिकारिक प्रश्न होइनन्। पाठ्यक्रम, विज्ञापन र नतिजाका लागि सम्बन्धित निकायको आधिकारिक वेबसाइट हेर्नुहोस्। उत्तरमा गल्ती भेटे प्रश्नमुनिको "टिप्पणी / गल्ती रिपोर्ट" मा लेख्नुहोस्।
नमस्ते! पाठ्यक्रम, सामान्य ज्ञान, भाषा परीक्षा वा कुनै प्रश्नको उत्तर बुझ्न सोध्नुहोस्।
AI ले गल्ती गर्न सक्छ। महत्वपूर्ण कुरा आधिकारिक स्रोतमा जाँच्नुहोस्।