नमस्ते · Hello

न हि ज्ञानेन सदृशं पवित्रमिह विद्यते।

यस संसारमा ज्ञानजत्तिको पवित्र अरू केही छैन। (गीता ४.३८)

Nothing in this world is as pure as knowledge. (Gita 4.38)

…

प्रोग्रामिङ – Programming MCQ

प्रोग्रामिङ – कम्प्युटर र IT

Programming · Computer & IT (Technical) · १,५६५ प्रश्न

१,५६५ प्रश्न उपलब्ध। मोड छान्नुहोस्:

प्रोग्रामिङ: प्रश्न र उत्तर

सही लागेको विकल्पमा थिच्नुहोस्। सही भए हरियो, गलत भए रातो देखिन्छ; ३ सेकेन्डपछि सही उत्तर र व्याख्या देखिन्छ।

  1. What is printed by the C++ code: map<int, int> m; m[3] = 1; m[1] = 2; m[2] = 3; for (auto &p : m) cout << p.second; ?

    💬 टिप्पणी / गल्ती रिपोर्ट (०)

    टिप्पणी जाँचपछि मात्र देखिन्छ।

  2. What is printed by the C++ code: string s = "Kathmandu"; cout << s.length() - s.find("man"); ?

    💬 टिप्पणी / गल्ती रिपोर्ट (०)

    टिप्पणी जाँचपछि मात्र देखिन्छ।

  3. What is printed by the C++ code: vector<int> v{3, 1, 4, 1, 5}; cout << count(v.begin(), v.end(), 1) << *max_element(v.begin(), v.end()); ?

    💬 टिप्पणी / गल्ती रिपोर्ट (०)

    टिप्पणी जाँचपछि मात्र देखिन्छ।

  4. In C++, given template <typename T> T sum(T a, T b) { return a + b; }, what is printed by cout << sum(2, 3) << sum(2.5, 1.5); ?

    💬 टिप्पणी / गल्ती रिपोर्ट (०)

    टिप्पणी जाँचपछि मात्र देखिन्छ।

  5. In C++, given struct C { int v; C& operator++() { v += 2; return *this; } };, what is printed by C c{1}; ++c; ++c; cout << c.v; ?

    💬 टिप्पणी / गल्ती रिपोर्ट (०)

    टिप्पणी जाँचपछि मात्र देखिन्छ।

  6. In C++, given void f(int x, int &y) { x++; y++; } and int a = 1, b = 1;, what is printed by f(a, b); cout << a << b; ?

    💬 टिप्पणी / गल्ती रिपोर्ट (०)

    टिप्पणी जाँचपछि मात्र देखिन्छ।

  7. In C++, class Base's destructor prints "1", class M's destructor prints "3", and class Derived : public Base has a data member of type M and a destructor that prints "2". What is printed when a Derived object goes out of scope?

    💬 टिप्पणी / गल्ती रिपोर्ट (०)

    टिप्पणी जाँचपछि मात्र देखिन्छ।

  8. In C++, class A prints "A" in its constructor, and class B has a data member of type A and prints "B" in its own constructor. What is printed by the declaration B b; ?

    💬 टिप्पणी / गल्ती रिपोर्ट (०)

    टिप्पणी जाँचपछि मात्र देखिन्छ।

  9. What is printed by the C code: int i; for (i = 0; i < 3; i++) { static int s = 0; s += i; printf("%d", s); } ?

    💬 टिप्पणी / गल्ती रिपोर्ट (०)

    टिप्पणी जाँचपछि मात्र देखिन्छ।

  10. What is printed by the C code: int a = 1; { int a = 2; { a = 3; } printf("%d", a); } printf("%d", a); ?

    💬 टिप्पणी / गल्ती रिपोर्ट (०)

    टिप्पणी जाँचपछि मात्र देखिन्छ।

यी अभ्यास प्रश्न हुन्, आधिकारिक प्रश्न होइनन्। पाठ्यक्रम, विज्ञापन र नतिजाका लागि सम्बन्धित निकायको आधिकारिक वेबसाइट हेर्नुहोस्। उत्तरमा गल्ती भेटे प्रश्नमुनिको "टिप्पणी / गल्ती रिपोर्ट" मा लेख्नुहोस्।