कम्प्युटर / सूचना प्रविधि कम्प्युटर अपरेटर (पाँचौँ तह) र सहायक – प्राविधिक पत्र
कम्प्युटर / सूचना प्रविधि – कम्प्युटर अपरेटर (पाँचौँ तह) र सहायक
Computer Operator & Assistant · Computer & IT Posts
२,५७७ प्रश्न उपलब्ध। मोड छान्नुहोस्:
प्राविधिक पत्र: प्रश्न र उत्तर
सही लागेको विकल्पमा थिच्नुहोस्। सही भए हरियो, गलत भए रातो देखिन्छ; ५ सेकेन्डपछि सही उत्तर र व्याख्या देखिन्छ।
सही: ० / ०
-
In Java, what is printed by: Integer a = 127, b = 127, c = 128, d = 128; System.out.println((a == b) + " " + (c == d)); ?
सही उत्तर: ख) true false
Autoboxing caches Integer objects from -128 to 127, so a and b are the same object; 128 creates separate objects, and == compares references.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
A Java conditional expression is combined with string concatenation: int x = 5; System.out.println(x > 3 ? "big" : "small" + x);. What appears on the console?
सही उत्तर: क) big
The condition is true, so the first operand "big" is chosen; the + x belongs only to the second operand.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
In Java, what is printed by: char c = 'A'; c += 2; System.out.println(c); ?
सही उत्तर: ख) C
Compound assignment includes an implicit cast back to char, so c becomes 'C' (unlike c = c + 2, which does not compile).
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
In Java, what is printed by: System.out.println(Math.max(3, 7) + Math.abs(-4) + Math.sqrt(16)); ?
सही उत्तर: ख) 15.0
7 + 4 = 11 (int), and adding Math.sqrt(16), which returns the double 4.0, gives 15.0.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
In Java, what is printed by: System.out.println("abc".compareTo("abd")); ?
सही उत्तर: घ) -1
compareTo returns the difference of the first differing characters: 'c' - 'd' = -1.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
In Java, what is printed by: StringBuilder sb = new StringBuilder("12345"); sb.deleteCharAt(2); System.out.println(sb); ?
सही उत्तर: ख) 1245
deleteCharAt(2) removes the character at index 2, which is '3'.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
In Java, what is printed by: String s = "Nepal"; System.out.println(s.replace('a', 'o') + s.length()); ?
सही उत्तर: ग) Nepol5
replace returns a new string "Nepol" and the length 5 is appended as text.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
A Java expression mixes int and double operands: System.out.println(7 / 2 * 2.0 + 7 % 3);. Which value is displayed?
सही उत्तर: ख) 7.0
7 / 2 is 3 (integer), 3 * 2.0 = 6.0 and 7 % 3 = 1, so the double result 7.0 is printed.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
What is printed by the C++ code: set<int> s{5, 2, 8, 2}; cout << *s.begin() << *s.rbegin() << s.size(); ?
सही उत्तर: ख) 283
A set keeps unique sorted elements {2, 5, 8}: the first is 2, the last is 8 and the size is 3.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
What is printed by the C++ statement cout << (5 / 2) * 2.0 << " " << 5 / 2.0 * 2; ?
सही उत्तर: घ) 4 5
5 / 2 is integer division (2), times 2.0 gives 4; 5 / 2.0 = 2.5, times 2 gives 5.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
यी अभ्यास प्रश्न हुन्, आधिकारिक प्रश्न होइनन्। पाठ्यक्रम, विज्ञापन र नतिजाका लागि सम्बन्धित निकायको आधिकारिक वेबसाइट हेर्नुहोस्। उत्तरमा गल्ती भेटे प्रश्नमुनिको "टिप्पणी / गल्ती रिपोर्ट" मा लेख्नुहोस्।
नमस्ते! पाठ्यक्रम, सामान्य ज्ञान, भाषा परीक्षा वा कुनै प्रश्नको उत्तर बुझ्न सोध्नुहोस्।
AI ले गल्ती गर्न सक्छ। महत्वपूर्ण कुरा आधिकारिक स्रोतमा जाँच्नुहोस्।