प्रोग्रामिङ – Programming MCQ
प्रोग्रामिङ – कम्प्युटर र IT
Programming · Computer & IT (Technical) · १,५६५ प्रश्न
१,५६५ प्रश्न उपलब्ध। मोड छान्नुहोस्:
प्रोग्रामिङ: प्रश्न र उत्तर
सही लागेको विकल्पमा थिच्नुहोस्। सही भए हरियो, गलत भए रातो देखिन्छ; ३ सेकेन्डपछि सही उत्तर र व्याख्या देखिन्छ।
सही: ० / ०
-
Because ** is right-associative in Python, the expression 2 ** 3 ** 2 evaluates to:
सही उत्तर: घ) 512
** is right-associative: 3 ** 2 = 9, then 2 ** 9 = 512.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
What is the output of print(-7 // 2) in Python 3?
सही उत्तर: क) -4
// is floor division; floor(-3.5) = -4.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
Compared with object-oriented programming, procedure-oriented programming:
सही उत्तर: क) emphasises functions and typically follows a top-down approach
POP (e.g. C) divides a program into functions designed top-down; OOP organises around objects, usually bottom-up.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
The word 'polymorphism' in object-oriented programming literally means:
सही उत्तर: ग) many forms
Polymorphism lets the same interface or operation behave differently for different types.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
In Java, the int data type is always:
सही उत्तर: घ) 32 bits, regardless of the platform
Java fixes the size of primitive types; int is always a 32-bit signed integer.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
In Java, a class member declared with no access modifier (default access) is accessible:
सही उत्तर: ग) only within classes of the same package
Default (package-private) access limits visibility to the same package.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
In Java, String objects are:
सही उत्तर: घ) immutable, so their contents cannot be changed after creation
Any operation that seems to modify a String creates a new String object.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
The correct signature of the main method in a Java application is:
सही उत्तर: घ) public static void main(String[] args)
The JVM starts a Java program by calling public static void main(String[] args).
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
Which C++ function declaration with default arguments is valid?
सही उत्तर: क) void f(int a, int b = 2, int c = 3);
Default arguments must be given from right to left; no parameter without a default may follow one with a default.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
In C++, a base class destructor should be declared virtual so that:
सही उत्तर: घ) deleting a derived object through a base-class pointer also calls the derived destructor
Without a virtual destructor, delete on a base pointer calls only the base destructor, causing resource leaks.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
यी अभ्यास प्रश्न हुन्, आधिकारिक प्रश्न होइनन्। पाठ्यक्रम, विज्ञापन र नतिजाका लागि सम्बन्धित निकायको आधिकारिक वेबसाइट हेर्नुहोस्। उत्तरमा गल्ती भेटे प्रश्नमुनिको "टिप्पणी / गल्ती रिपोर्ट" मा लेख्नुहोस्।
नमस्ते! पाठ्यक्रम, सामान्य ज्ञान, भाषा परीक्षा वा कुनै प्रश्नको उत्तर बुझ्न सोध्नुहोस्।
AI ले गल्ती गर्न सक्छ। महत्वपूर्ण कुरा आधिकारिक स्रोतमा जाँच्नुहोस्।