कम्प्युटर र सूचना प्रविधि (प्राविधिक)
कम्प्युटर र सूचना प्रविधि (प्राविधिक)
Computer & IT (Technical) · ५,०७६ प्रश्न
५,०७६ प्रश्न उपलब्ध। मोड छान्नुहोस्:
कम्प्युटर र IT: प्रश्न र उत्तर
सही लागेको विकल्पमा थिच्नुहोस्। सही भए हरियो, गलत भए रातो देखिन्छ; ३ सेकेन्डपछि सही उत्तर र व्याख्या देखिन्छ।
सही: ० / ०
-
In Java, what is printed by: String s1 = "hi", s2 = "hi"; System.out.println(s1 == s2); ?
सही उत्तर: घ) true
Identical string literals are interned in the string pool, so both variables refer to the same object.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
Java: System.out.println(10 / 3 * 3.0); displays which value?
सही उत्तर: ग) 9.0
10 / 3 is integer division (3); then 3 * 3.0 = 9.0, a double.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
In Java, what is printed by: int[] arr = new int[3]; System.out.println(arr[1]); ?
सही उत्तर: घ) 0
Elements of a newly created int array are automatically initialised to 0.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
In C++, non-static data members of a class are initialised in the order in which they are:
सही उत्तर: घ) declared in the class
Members are always initialised in declaration order, whatever order the initializer list uses.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
What is printed by the C++ code: cout << (3 > 2) << " " << boolalpha << (3 > 2); ?
सही उत्तर: क) 1 true
By default a bool is printed as 1 or 0; after the boolalpha manipulator it is printed as true or false.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
What is printed by the C++ code: string s = "Nepal"; cout << s.substr(1, 3); ?
सही उत्तर: घ) epa
substr(pos, len) returns len characters starting at index pos: 3 characters from index 1 give "epa".
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
What is printed by the C++ code: vector<int> v = {1, 2, 3}; v.push_back(4); v.pop_back(); v.push_back(5); cout << v.size() << v.back(); ?
सही उत्तर: क) 45
After the operations v is {1, 2, 3, 5}: size 4 and last element 5.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
In C++, base class B1's constructor calls the virtual function h(), which prints "A"; derived class D1 overrides h() to print "B". What is printed by creating D1 d; ?
सही उत्तर: क) A
While the base-class constructor runs, the object is still a B1, so a virtual call made there uses B1's version.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
What is printed by the C++ statement: cout << 7 / 2 << " " << 7 / 2.0; ?
सही उत्तर: ग) 3 3.5
7 / 2 is integer division (3), while 7 / 2.0 is floating-point division (3.5).
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
In C++, class N prints its name in its destructor. In a block, N x("x"); N y("y"); are declared. What is printed when the block ends?
सही उत्तर: घ) yx
Local objects are destroyed in the reverse order of their construction, so y is destroyed before x.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
यी अभ्यास प्रश्न हुन्, आधिकारिक प्रश्न होइनन्। पाठ्यक्रम, विज्ञापन र नतिजाका लागि सम्बन्धित निकायको आधिकारिक वेबसाइट हेर्नुहोस्। उत्तरमा गल्ती भेटे प्रश्नमुनिको "टिप्पणी / गल्ती रिपोर्ट" मा लेख्नुहोस्।
नमस्ते! पाठ्यक्रम, सामान्य ज्ञान, भाषा परीक्षा वा कुनै प्रश्नको उत्तर बुझ्न सोध्नुहोस्।
AI ले गल्ती गर्न सक्छ। महत्वपूर्ण कुरा आधिकारिक स्रोतमा जाँच्नुहोस्।