प्रोग्रामिङ – Programming MCQ
प्रोग्रामिङ – कम्प्युटर र IT
Programming · Computer & IT (Technical) · १,५६५ प्रश्न
१,५६५ प्रश्न उपलब्ध। मोड छान्नुहोस्:
प्रोग्रामिङ: प्रश्न र उत्तर
सही लागेको विकल्पमा थिच्नुहोस्। सही भए हरियो, गलत भए रातो देखिन्छ; ३ सेकेन्डपछि सही उत्तर र व्याख्या देखिन्छ।
सही: ० / ०
-
The property of an algorithm that each step must be precisely and unambiguously defined is called:
सही उत्तर: ख) definiteness
Definiteness requires every instruction to have exactly one clear meaning.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
Storing a graph with V vertices and E edges as an adjacency list needs space of:
सही उत्तर: घ) O(V + E)
There is one list per vertex plus one entry per edge (two for undirected), so space is proportional to V + E.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
What is the time complexity of: for (i = n; i > 0; i /= 2) for (j = 0; j < n; j++) sum++; ?
सही उत्तर: ग) O(n log n)
The outer loop runs about log2 n times and the inner loop n times for each, giving O(n log n).
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
The keys 50, 30, 70, 20, 40 are inserted in that order into an empty binary search tree. Its preorder traversal is:
सही उत्तर: घ) 50 30 20 40 70
Preorder visits root, left subtree, right subtree: 50, then 30 with children 20 and 40, then 70.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
In hashing with linear probing, if the computed slot is already occupied, the key is placed:
सही उत्तर: ख) in the next free slot found by checking the following slots one by one
Linear probing tries h(k)+1, h(k)+2, ... (wrapping around) until an empty slot is found.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
Binary search is used on the sorted array [2, 5, 8, 12, 16, 23, 38, 56, 72, 91] (indices 0 to 9) to find 23. Using mid = (low + high) / 2 with integer division, which element is compared first?
सही उत्तर: ग) 16
mid = (0 + 9) / 2 = 4, and a[4] = 16; since 23 > 16 the search continues in the right half.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
The value of the prefix expression * + 2 3 4 is:
सही उत्तर: घ) 20
+ 2 3 = 5 and then * 5 4 = 20.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
Converting (A + B) * C - D into reverse Polish (postfix) notation gives:
सही उत्तर: घ) AB+C*D-
First A+B gives AB+, multiply by C gives AB+C*, then subtract D: AB+C*D-.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
In asymptotic analysis, Big-Omega notation gives:
सही उत्तर: ख) a lower bound on the growth of a function
Big-O gives an upper bound, Big-Omega a lower bound, and Big-Theta a tight bound.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
The time complexity of the naive recursive Fibonacci function fib(n) = fib(n-1) + fib(n-2) is:
सही उत्तर: ख) exponential, about O(2^n)
Each call makes two more calls, recomputing the same values many times, so the call tree grows exponentially.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
यी अभ्यास प्रश्न हुन्, आधिकारिक प्रश्न होइनन्। पाठ्यक्रम, विज्ञापन र नतिजाका लागि सम्बन्धित निकायको आधिकारिक वेबसाइट हेर्नुहोस्। उत्तरमा गल्ती भेटे प्रश्नमुनिको "टिप्पणी / गल्ती रिपोर्ट" मा लेख्नुहोस्।
नमस्ते! पाठ्यक्रम, सामान्य ज्ञान, भाषा परीक्षा वा कुनै प्रश्नको उत्तर बुझ्न सोध्नुहोस्।
AI ले गल्ती गर्न सक्छ। महत्वपूर्ण कुरा आधिकारिक स्रोतमा जाँच्नुहोस्।