FliQi Education App Download
विषय-वार प्रश्न-बैंक

Dot Net — प्रश्न-बैंक

161 जाँचे हुए प्रश्न · 3 topics · 1 पिछले वर्षों के पेपरों से

Topics

किन परीक्षाओं में

नमूना प्रश्न

भाषा
प्रश्न 1उत्तर + हल Introduction to DOT NET Framework
.NET में CLR का पूरा नाम (full form) क्या है?
What is the full form of CLR in .NET?
  1. AComputer Language Runtime
  2. BCommon Language Runtime
  3. CCommon Learn Run
  4. Dइनमें से कोई नहींNone of these

सही उत्तर / Answer: (B)

हल / Solution
CLR का पूरा नाम Common Language Runtime है। यह .NET का execution engine है। यह MSIL code को JIT compiler से machine code में बदलता है। साथ ही memory management, garbage collection, type safety, security और exception handling भी संभालता है। इसे common इसलिए कहते हैं कि C#, VB.NET, F# जैसी सभी .NET भाषाएँ इसी एक runtime पर चलती हैं। बाक़ी दोनों नाम गढ़े हुए हैं, और सही विकल्प मौजूद है, इसलिए 'कोई नहीं' ग़लत है।
CLR stands for Common Language Runtime. It is the execution engine of .NET. It converts MSIL code into machine code using the JIT compiler. It also handles memory management, garbage collection, type safety, security and exception handling. It is called common because all .NET languages, such as C#, VB.NET and F#, run on this one runtime. The other two expansions are made up, and since a correct option exists, 'None of these' is wrong.
प्रश्न 2उत्तर + हल Polymorphism
Method overriding कैसे प्राप्त (achieve) की जाती है?
How is method overriding achieved?
  1. AArguments की संख्या समान होनी चाहिएMust be similar number of arguments
  2. BArguments का क्रम समान होना चाहिएMust be similar sequence of arguments
  3. CA और B दोनोंBoth A & B
  4. Dइनमें से कोई नहींNone of these

सही उत्तर / Answer: (C)

हल / Solution
overriding में derived class का method, base class के method जैसा ही होना चाहिए। नाम वही, return type वही, parameter की संख्या वही और उनका type व क्रम भी वही। अगर संख्या या क्रम बदल गया तो वह override नहीं, नया overload बन जाता है और compiler override पर error देता है। इसलिए संख्या और क्रम दोनों का समान होना ज़रूरी है। सिर्फ़ एक शर्त काफ़ी नहीं, इसलिए विकल्प 1 और 2 अकेले अधूरे हैं।
In overriding, the derived class method must match the base class method. The name, return type, number of parameters, and their types and order must all be the same. If the number or order changes, it becomes a new overload, not an override, and the compiler reports an error on the override keyword. So both the number and the order must match. One condition alone is not enough, so options 1 and 2 alone are incomplete.
प्रश्न 3उत्तर + हल OOPs Concepts
C# में object का valid syntax कौन-सा है?
Which is the valid syntax of an object in C#?
  1. Aclassname Ref. Variable = new class name ();
  2. Binterface name object = new object ();
  3. Cclassname = new class name ();
  4. Dये सभीAll of these

सही उत्तर / Answer: (A)

हल / Solution
C# में object बनाने का रूप है: ClassName refVariable = new ClassName(); बाईं ओर class का नाम और reference variable होता है, दाईं ओर new operator constructor को call करता है। विकल्प 2 में interface वाले variable को साधारण object बिना cast दिया जा रहा है, और object एक keyword है, इसलिए वह variable का नाम भी नहीं हो सकता। विकल्प 3 में variable का नाम ही ग़ायब है। इसलिए 'ये सभी' भी ग़लत है।
The C# syntax for creating an object is ClassName refVariable = new ClassName(); The left side gives the class type and a reference variable, and on the right the new operator calls the constructor. Option 2 assigns a plain object instance to an interface variable without a cast, and object is a keyword, so it cannot be a variable name. Option 3 has no variable name at all. So All of these is wrong.
Dot Net का पूरा प्रश्न-बैंकहर topic के सारे प्रश्न, हल और अभ्यास — FliQi Question Bank app में