<<= Back Next =>>
You Are On Multi Choice Question Bank SET 484

24201. For the code snippet given below, which of the following statements are valid? public class MyContainer<T> where T: class, IComparable { //Insert code here } Class MyContainer requires that it's type argument must implement IComparable interface. Compiler will report an error for this block of code. There are multiple constraints on type argument to MyContainer class. Class MyContainer requires that its type argument must be a reference type and it must implement IComparable interface.






24202. Which of the following statements is valid about advantages of generics?






24203. Which one of the following classes are present System.Collections.Generic namespace? Stack Tree SortedDictionary SortedArray






24204. For the code snippet shown below, which of the following statements are valid? public class Generic<T> { public T Field; public void TestSub() { T i = Field + 1; } } class MyProgram { static void Main(string[] args) { Generic<int> gen = new Generic<int>(); gen.TestSub(); } }






24205. Which of the following statements are valid about generics in .NET Framework? Generics is a language feature. We can create a generic class, however, we cannot create a generic interface in C#.NET. Generics delegates are not allowed in C#.NET. Generics are useful in collection classes in .NET framework. None of the above






24206. Which of the following statements is valid about generic procedures in C#.NET?






24207. For the code snippet shown below, which of the following statements are valid? public class TestIndiaBix { public void TestSub<M> (M arg) { Console.Write(arg); } } class MyProgram { static void Main(string[] args) { TestIndiaBix bix = new TestIndiaBix(); bix.TestSub("IndiaBIX "); bix.TestSub(4.2f); } }






24208. Q.In the prothallus of vascular cryptogam, the antherozoids and eggs mature at different times. As a result:





24209. Q.Two plants can be conclusively said to belong to the same species if they:





24210. Which of these statements is true?





24211. Q.If you are asked to classify the various algae into distinct groups, which of the following characters you should choose?





24212. ‘Latent’ means:





24213. What will be the output of the C#.NET code snippet given below? namespace IndiabixConsoleApplication { class Baseclass { public void fun() { Console.Write("Base class" + " "); } } class Derived1: Baseclass { new void fun() { Console.Write("Derived1 class" + " "); } } class Derived2: Derived1 { new void fun() { Console.Write("Derived2 class" + " "); } } class Program { public static void Main(string[ ] args) { Derived2 d = new Derived2(); d.fun(); } } }






24214. Which of the following should be used to implement a 'Has a' relationship between two entities?






24215. Which of the following is correct about the C#.NET snippet given below? namespace IndiabixConsoleApplication { class Baseclass { public void fun() { Console.WriteLine("Hi" + " "); } public void fun(int i) { Console.Write("Hello" + " "); } } class Derived: Baseclass { public void fun() { Console.Write("Bye" + " "); } } class MyProgram { static void Main(string[ ] args) { Derived d; d = new Derived(); d.fun(); d.fun(77); } } }





24216. In an inheritance chain which of the following members of base class are accessible to the derived class members? static protected private shared public





24217. Which of the following are reuse mechanisms available in C#.NET? Inheritance Encapsulation Templates Containership Polymorphism





24218. Which of the following should be used to implement a 'Like a' or a 'Kind of' relationship between two entities?






24219. How can you prevent inheritance from a class in C#.NET ?






24220. Which of the following statements are correct about Inheritance in C#.NET? A derived class object contains all the base class data. Inheritance cannot suppress the base class functionality. A derived class may not be able to access all the base class data. Inheritance cannot extend the base class functionality. In inheritance chain construction of object happens from base towards derived.





24221. Assume class B is inherited from class A. Which of the following statements is correct about construction of an object of class B?






24222. Which of the following statements is correct about the C#.NET program given below? namespace IndiabixConsoleApplication { class Baseclass { int i; public Baseclass(int ii) { i = ii; Console.Write("Base "); } } class Derived : Baseclass { public Derived(int ii) : base(ii) { Console.Write("Derived "); } } class MyProgram { static void Main(string[ ] args) { Derived d = new Derived(10); } } }






24223. Multiple inheritance is different from multiple levels of inheritance.



24224. An object of a derived class cannot access private members of base class.



24225. The way a derived class member function can access base class public members, the base class member functions can access public member functions of derived class.



24226. There is no private or protected inheritance in C#.NET.



24227. We can derive a class from a base class even if the base class's source code is not available.



24228. If a base class contains a member function func(), and a derived class does not contain a function with this name, an object of the derived class cannot access func().



24229. If a base class and a derived class each include a member function with the same name, the member function of the derived class will be called by an object of the derived class



24230. The size of a derived class object is equal to the sum of sizes of data members in base class and the derived class.



24231. Private members of base class cannot be accessed by derived class member functions or objects of derived class.



24232. A class D can be derived from a class C, which is derived from a class B, which is derived from a class A.



24233. There is no multiple inheritance in C#.NET. That is, a class cannot be derived from multiple base classes.



24234. Creating a derived class from a base class requires fundamental changes to the base class.



24235. It is illegal to make objects of one class as members of another class.



24236. Which of the following can be facilitated by the Inheritance mechanism? Use the existing functionality of base class. Overrride the existing functionality of base class. Implement new functionality in the derived class. Implement polymorphic behaviour. Implement containership.





24237. Which of the following statements should be added to the subroutine fun( ) if the C#.NET code snippet given below is to output 9 13? class BaseClass { protected int i = 13; } class Derived: BaseClass { int i = 9; public void fun() { // [ Add statement here ] } }






24238. Which of the following statements are correct about the C#.NET code snippet given below? namespace IndiabixConsoleApplication { class index { protected int count; public index() { count = 0; } } class index1: index { public void increment() { count = count +1; } } class MyProgram { static void Main(string[] args) { index1 i = new index1(); i.increment(); } } } count should be declared as public if it is to become available in the inheritance chain. count should be declared as protected if it is to become available in the inheritance chain. While constructing an object referred to by i firstly constructor of index class will be called followed by constructor of index1 class. Constructor of index class does not get inherited in index1 class. count should be declared as Friend if it is to become available in the inheritance chain.






24239. What will be the size of the object created by the following C#.NET code snippet? namespace IndiabixConsoleApplication { class Baseclass { private int i; protected int j; public int k; } class Derived: Baseclass { private int x; protected int y; public int z; } class MyProgram { static void Main (string[ ] args) { Derived d = new Derived(); } } }






24240. Which statement will you add in the function fun() of class B, if it is to produce the output "Welcome to IndiaBIX.com!"? namespace IndiabixConsoleApplication { class A { public void fun() { Console.Write("Welcome"); } } class B: A { public void fun() { // [ Add statement here ] Console.WriteLine(" to IndiaBIX.com!"); } } class MyProgram { static void Main (string[ ] args) { B b = new B(); b.fun(); } } }






24241. Q.Flagellated male gametes are present in all the three of which one of the following sets?





24242. Q.In gymnosperms, the pollen chamber represents:





24243. Q.Spore dissemination in some liverworts is aided by:





24244. Q.Which pair of the following belongs to Basidiomycetes?





24245. The antonym of payment is





24246. Which of the following statements is correct about an interface used in C#.NET?






24247. Which of the following statements is correct about an interface?





24248. Which of the following statements are correct about an interface in C#.NET? A class can implement multiple interfaces. Structures cannot inherit a class but can implement an interface. In C#.NET, : is used to signify that a class member implements a specific interface. An interface can implement multiple classes. The static attribute can be used with a method that implements an interface declaration.





24249. Which of the following is the correct implementation of the interface given below? interface IMyInterface { double MyFun(Single i); }





24250. No matter...............you must keep trying





<<= Back Next =>>
Terms And Service:We do not guarantee the accuracy of available data ..We Provide Information On Public Data.. Please consult an expert before using this data for commercial or personal use
DMCA.com Protection Status Powered By:Omega Web Solutions
© 2002-2017 Omega Education PVT LTD...Privacy | Terms And Conditions