कम्प्युटर / सूचना प्रविधि कम्प्युटर अपरेटर (पाँचौँ तह) र सहायक – प्राविधिक पत्र
कम्प्युटर / सूचना प्रविधि – कम्प्युटर अपरेटर (पाँचौँ तह) र सहायक
Computer Operator & Assistant · Computer & IT Posts
२,५७७ प्रश्न उपलब्ध। मोड छान्नुहोस्:
प्राविधिक पत्र: प्रश्न र उत्तर
सही लागेको विकल्पमा थिच्नुहोस्। सही भए हरियो, गलत भए रातो देखिन्छ; ५ सेकेन्डपछि सही उत्तर र व्याख्या देखिन्छ।
सही: ० / ०
-
What does the following Java code print? System.out.println(true ? 1 : 2.0);
सही उत्तर: ख) 1.0
The two operands of ?: are int and double, so the result type is double and the int 1 is printed as 1.0.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
What does the following Java code print? System.out.println(Math.ceil(4.1) + Math.floor(-4.1));
सही उत्तर: ख) 0.0
Math.ceil(4.1) = 5.0 and Math.floor(-4.1) = -5.0; their double sum is printed as 0.0.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
What does the following Java code print? System.out.println((int) 3.99 + (int) -3.99);
सही उत्तर: ग) 0
Casting a double to int truncates towards zero: 3 + (-3) = 0.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
What does the following Java code print? System.out.println(-8 >>> 28);
सही उत्तर: क) 15
>>> is an unsigned shift: -8 is 0xFFFFFFF8, and shifting it right 28 places with zeros gives 0xF = 15.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
What does the following Java code print? System.out.println(Integer.toBinaryString(10));
सही उत्तर: घ) 1010
Integer.toBinaryString(10) returns the binary digits without any prefix: 1010.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
What does the following Java code print? System.out.println(Integer.parseInt("12") + Integer.parseInt("3"));
सही उत्तर: ग) 15
parseInt() converts both strings to int values, so they are added arithmetically: 12 + 3 = 15.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
What does the following Java code print? System.out.println("Nepal".contains("pa") + " " + "Nepal".equalsIgnoreCase("NEPAL"));
सही उत्तर: ख) true true
"pa" occurs in "Nepal", and equalsIgnoreCase() ignores letter case, so both are true.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
What does the following C++ code print? pair<int, string> p = {3, "abc"}; cout << p.first + p.second.size();
सही उत्तर: घ) 6
p.first is 3 and p.second.size() is 3; their sum is 6.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
What does the following C++ code print? int a = 10; int &r = a; int *p = &r; *p = 20; cout << a + r;
सही उत्तर: क) 40
r is another name for a and p points to a, so *p = 20 sets a to 20; a + r = 40.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
What does the following C++ code print? namespace A { int x = 1; } namespace B { int x = 2; } cout << A::x * 10 + B::x;
सही उत्तर: ख) 12
A::x is 1 and B::x is 2, so 1 * 10 + 2 = 12; the scope resolution operator selects each namespace's x.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
यी अभ्यास प्रश्न हुन्, आधिकारिक प्रश्न होइनन्। पाठ्यक्रम, विज्ञापन र नतिजाका लागि सम्बन्धित निकायको आधिकारिक वेबसाइट हेर्नुहोस्। उत्तरमा गल्ती भेटे प्रश्नमुनिको "टिप्पणी / गल्ती रिपोर्ट" मा लेख्नुहोस्।
नमस्ते! पाठ्यक्रम, सामान्य ज्ञान, भाषा परीक्षा वा कुनै प्रश्नको उत्तर बुझ्न सोध्नुहोस्।
AI ले गल्ती गर्न सक्छ। महत्वपूर्ण कुरा आधिकारिक स्रोतमा जाँच्नुहोस्।