कम्प्युटर र सूचना प्रविधि (प्राविधिक)
कम्प्युटर र सूचना प्रविधि (प्राविधिक)
Computer & IT (Technical) · ५,०७६ प्रश्न
५,०७६ प्रश्न उपलब्ध। मोड छान्नुहोस्:
कम्प्युटर र IT: प्रश्न र उत्तर
सही लागेको विकल्पमा थिच्नुहोस्। सही भए हरियो, गलत भए रातो देखिन्छ; ३ सेकेन्डपछि सही उत्तर र व्याख्या देखिन्छ।
सही: ० / ०
-
What is the output of the Python code: a, b = 3, 5; a, b = b, a + b; print(a, b) ?
सही उत्तर: घ) 5 8
The right side is evaluated first using the old values (5 and 3 + 5), then assigned to a and b together.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
What is the output of the Python code: x, *y = [1, 2, 3, 4]; print(y) ?
सही उत्तर: क) [2, 3, 4]
In extended unpacking the starred name collects all remaining items into a list.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
What is the output of the Python code: a = [1, 2]; a.extend('ab'); print(a) ?
सही उत्तर: ख) [1, 2, 'a', 'b']
extend() adds each element of an iterable; a string is iterated character by character.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
What is the output of the Python code: a = [[0] * 2] * 2; a[0][0] = 5; print(a) ?
सही उत्तर: ख) [[5, 0], [5, 0]]
Multiplying the outer list copies the reference, so both rows are the same inner list and the change shows in both.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
What is the output of the Python code: a = [1, 2, 3]; a.insert(1, 9); print(a) ?
सही उत्तर: ग) [1, 9, 2, 3]
insert(1, 9) places 9 at index 1 and shifts the later elements to the right.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
What is the output of the Python code: print('42'.zfill(5)) ?
सही उत्तर: घ) 00042
zfill(5) pads the string on the left with zeros until it is 5 characters long.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
What is the output of the Python code: print('Nepal'.startswith('Ne'), 'Nepal'.endswith('L')) ?
सही उत्तर: क) True False
Both methods are case-sensitive: 'Nepal' starts with 'Ne' but ends with a lower-case 'l', not 'L'.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
What is the output of the Python code: print('banana'.count('an')) ?
सही उत्तर: क) 2
count() returns the number of non-overlapping occurrences; 'an' appears twice in 'banana'.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
What is printed by the C code: char a[] = "ab", b[] = "ab"; printf("%d", a == b); ?
सही उत्तर: ख) 0
a == b compares the addresses of two different arrays, not their contents, so it is false (0); strcmp() is needed to compare contents.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
What is printed by the C code: int x = 0x0F & 0xF5; printf("%d", x); ?
सही उत्तर: ग) 5
0x0F keeps only the low four bits of 0xF5 (binary 11110101), which are 0101 = 5.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
यी अभ्यास प्रश्न हुन्, आधिकारिक प्रश्न होइनन्। पाठ्यक्रम, विज्ञापन र नतिजाका लागि सम्बन्धित निकायको आधिकारिक वेबसाइट हेर्नुहोस्। उत्तरमा गल्ती भेटे प्रश्नमुनिको "टिप्पणी / गल्ती रिपोर्ट" मा लेख्नुहोस्।
नमस्ते! पाठ्यक्रम, सामान्य ज्ञान, भाषा परीक्षा वा कुनै प्रश्नको उत्तर बुझ्न सोध्नुहोस्।
AI ले गल्ती गर्न सक्छ। महत्वपूर्ण कुरा आधिकारिक स्रोतमा जाँच्नुहोस्।