प्रोग्रामिङ – Programming MCQ
प्रोग्रामिङ – कम्प्युटर र IT
Programming · Computer & IT (Technical) · १,५६५ प्रश्न
१,५६५ प्रश्न उपलब्ध। मोड छान्नुहोस्:
प्रोग्रामिङ: प्रश्न र उत्तर
सही लागेको विकल्पमा थिच्नुहोस्। सही भए हरियो, गलत भए रातो देखिन्छ; ३ सेकेन्डपछि सही उत्तर र व्याख्या देखिन्छ।
सही: ० / ०
-
What is the output of print(0.1 + 0.2 == 0.3) in Python?
सही उत्तर: क) False
0.1 and 0.2 cannot be stored exactly in binary floating point, so their sum is 0.30000000000000004.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
What is the output of print('Hello'.find('z')) in Python?
सही उत्तर: क) -1
str.find() returns -1 when the substring is not found (index() would raise ValueError).
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
What does chr(66) return in Python?
सही उत्तर: ग) 'B'
chr() converts a Unicode code point to its character; 66 is 'B'. ord() does the reverse.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
What does bin(10) return in Python?
सही उत्तर: ख) '0b1010'
bin() returns a string with the prefix 0b followed by the binary digits.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
What is the value of int('101', 2) in Python?
सही उत्तर: घ) 5
The second argument is the base, so '101' is read as binary: 4 + 0 + 1 = 5.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
What does divmod(17, 5) return in Python?
सही उत्तर: ख) (3, 2)
divmod(a, b) returns (a // b, a % b) = (3, 2).
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
In Python, the expression -7 % 3 evaluates to:
सही उत्तर: ख) 2
Python's % result takes the sign of the divisor: -7 = 3 x (-3) + 2, so the remainder is 2.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
The Python programming language was created by:
सही उत्तर: ग) Guido van Rossum
Guido van Rossum released Python in 1991; Ritchie created C, Gosling Java and Stroustrup C++.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
Before Java 8, all methods declared in a Java interface were implicitly:
सही उत्तर: क) public and abstract
Interface methods had no body and were public abstract; Java 8 added default and static methods.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
In Java, a variable declared with the final keyword:
सही उत्तर: ख) cannot have its value changed once it is assigned
final makes a variable a constant after initialisation.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
यी अभ्यास प्रश्न हुन्, आधिकारिक प्रश्न होइनन्। पाठ्यक्रम, विज्ञापन र नतिजाका लागि सम्बन्धित निकायको आधिकारिक वेबसाइट हेर्नुहोस्। उत्तरमा गल्ती भेटे प्रश्नमुनिको "टिप्पणी / गल्ती रिपोर्ट" मा लेख्नुहोस्।
नमस्ते! पाठ्यक्रम, सामान्य ज्ञान, भाषा परीक्षा वा कुनै प्रश्नको उत्तर बुझ्न सोध्नुहोस्।
AI ले गल्ती गर्न सक्छ। महत्वपूर्ण कुरा आधिकारिक स्रोतमा जाँच्नुहोस्।