नमस्ते · Hello

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

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

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

…

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

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

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

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

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

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

  1. What does the following C++ code print? try { throw string("err"); } catch (const char *e) { cout << "C"; } catch (string &s) { cout << s.size(); }

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

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

  2. What does the following C++ code print? string s = "hello world"; cout << count(s.begin(), s.end(), 'o');

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

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

  3. What does the following C++ code print? priority_queue<int> pq; pq.push(3); pq.push(1); pq.push(4); cout << pq.top(); pq.pop(); cout << pq.top();

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

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

  4. What does the following C++ code print? vector<int> v{1, 2, 3, 4}; v.erase(v.begin() + 1); v.insert(v.begin(), 9); for (int x : v) cout << x;

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

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

  5. What does the following C++ code print? string s = "abc"; s[1] = 'X'; cout << s + s.substr(2);

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

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

  6. What does the following C code print? int a = 5, b = 2; printf("%d %d", a / b * b, a % b + a / b);

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

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

  7. What does the following C code print? int x = 5, y = 0; if (y != 0 && x / y > 1) printf("A"); else printf("B");

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

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

  8. What does the following C code print? int a[] = {5, 9, 3, 9, 7}, i, f = a[0], s = -1; for (i = 1; i < 5; i++) { if (a[i] > f) { s = f; f = a[i]; } else if (a[i] < f && a[i] > s) s = a[i]; } printf("%d", s);

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

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

  9. What does the following C code print? char s[] = "NePal"; int i, c = 0; for (i = 0; s[i]; i++) { s[i] ^= 32; if (isupper(s[i])) c++; } printf("%d", c);

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

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

  10. What does the following C code print? int y = 1900; printf("%d", (y % 4 == 0 && y % 100 != 0) || y % 400 == 0);

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

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

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