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

9751. Which of the following statements is correct about an Exception?






9752. In C#.NET if we do not catch the exception thrown at runtime then which of the following will catch it?






9753. Which of the following statements is correct about the C#.NET program given below? using System; namespace IndiabixConsoleApplication { class MyProgram { static void Main(string[] args) { int index = 6; int val = 44; int[] a = new int[5]; try { a[index] = val ; } catch(IndexOutOfRangeException e) { Console.Write("Index out of bounds "); } Console.Write("Remaining program"); } } }






9754. Which of the following statements are correct about exception handling in C#.NET? If an exception occurs then the program terminates abruptly without getting any chance to recover from the exception. No matter whether an exception occurs or not, the statements in the finally clause (if present) will get executed. A program can contain multiple finally clauses. A finally clause is written outside the try block. finally clause is used to perform clean up operations like closing the network/database connections.






9755. John is tall and peter is short, but the ................is stronger.





9756. If the mean and the median pertaining to a certain character of a population are of the same value, the following is most likely to occur:





9757. Choose the word which has been wrongly spelt:





9758. Which one of the following is a slime mould?





9759. Q.For a critical study of secondary growth in plants, which one of the following pairs is suitable?





9760. Which of the following will be the correct output for the C#.NET program given below? namespace IndiabixConsoleApplication { class SampleProgram { static void Main(string[] args) { int a = 5; int s = 0, c = 0; Proc(a, ref s, ref c); Console.WriteLine(s + " " + c); } static void Proc(int x, ref int ss, ref int cc) { ss = x x; cc = x x x; } } }






9761. What will be the output of the C#.NET code snippet given below? namespace IndiabixConsoleApplication { class SampleProgram { static void Main(string[ ] args) { int i = 10; double d = 34.340; fun(i); fun(d); } static void fun(double d) { Console.WriteLine(d + " "); } } }





9762. Which of the following statements are correct? C# allows a function to have arguments with default values. C# allows a function to have variable number of arguments. Omitting the return value type in method definition results into an exception. Redefining a method parameter in the method's body causes an exception. params is used to specify the syntax for a function with variable number of arguments.






9763. If a procedure fun() is to receive an int, a Single & a double and it is to return a decimal then which of the following is the correct way of defining this procedure?






9764. If a function fun() is to receive an int, a Single & a double and it is to return a decimal then which of the following is the correct way of defining this function?






9765. Which of the following statements are correct about functions used in C#.NET? Function definitions cannot be nested. Functions can be called recursively. If we do not return a value from a function then a value -1 gets returned. To return the control from middle of a function exit function should be used. Function calls can be nested.






9766. How many values is a function capable of returning?






9767. What will be the output of the C#.NET code snippet given below? namespace IndiabixConsoleApplication { class SampleProgram { static void Main(string[ ] args) { object[] o = new object[] {"1", 4.0, "India", 'B'}; fun (o); } static void fun (params object[] obj) { for (int i = 0; i < obj.Length-1; i++) Console.Write(obj[i] + " "); } } }





9768. How many values is a subroutine capable of returning?






9769. Which of the following CANNOT occur multiple number of times in a program?






9770. What will be the output of the C#.NET code snippet given below? namespace IndiabixConsoleApplication { class SampleProgram { static void Main(string[ ] args) { int i; int res = fun(out i); Console.WriteLine(res); } static int fun (out int i) { int s = 1; i = 7; for(int j = 1; j <= i; j++) { s = s j; } return s; } } }






9771. If a function fun() is to sometimes receive an int and sometimes a double then which of the following is the correct way of defining this function?






9772. Which of the following statements are correct about subroutines used in C#.NET? If we do not return a value from a subroutine then a value -1 gets returned. Subroutine definitions cannot be nested. Subroutine can be called recursively. To return the control from middle of a subroutine exit subroutine should be used. Subroutine calls can be nested.






9773. A function can be used in an expression, whereas a subroutine cannot be.



9774. Which of the following statements are correct about the C#.NET program given below? namespace IndiabixConsoleApplication { class SampleProgram { static void Main(string[ ] args) { int a = 5; int s = 0, c = 0; s, c = fun(a); Console.WriteLine(s +" " + c) ; } static int fun(int x) { int ss, cc; ss = x x; cc = x x x; return ss, cc; } } } An error will be reported in the statement s, c = fun(a); since multiple values returned from a function cannot be collected in this manner. It will output 25 125. It will output 25 0. It will output 0 125. An error will be reported in the statement return ss, cc; since a function cannot return multiple values.






9775. What will be the output of the C#.NET code snippet given below? namespace IndiabixConsoleApplication { class SampleProgram { static void Main(string[ ] args) { int i = 5; int j; fun1(ref i); fun2(out j); Console.WriteLine(i + ", " + j); } static void funl(ref int x) { x = x x; } static void fun2(out int x) { x = 6; x = x x; } } }






9776. Which of the following will be the correct output for the C#.NET program given below? namespace IndiabixConsoleApplication { class SampleProgram { static void Main(string[] args) { int num = 1; funcv(num); Console.Write(num + ", "); funcr(ref num); Console.Write(num + ", "); } static void funcv(int num) { num = num + 10; Console.Write(num + ", "); } static void funcr (ref int num) { num = num + 10; Console.Write(num + ", "); } } }






9777. What will be the output of the C#.NET code snippet given below? namespace IndiabixConsoleApplication { class SampleProgram { static void Main(string[] args) { int[]arr = newint[]{ 1, 2, 3, 4, 5 }; fun(ref arr); } static void fun(ref int[] a) { for (int i = 0; i < a.Length; i++) { a[i] = a[i] 5; Console.Write(a[ i ] + " "); } } } }






9778. Which of the following statements are correct? An argument passed to a ref parameter need not be initialized first. Variables passed as out arguments need to be initialized prior to being passed. Argument that uses params keyword must be the last argument of variable argument list of a method. Pass by reference eliminates the overhead of copying large data items. To use a ref parameter only the calling method must explicitly use the ref keyword.






9779. A function returns a value, whereas a subroutine cannot return a value.



9780. Which of the following statements are correct about functions and subroutines used in C#.NET? A function cannot be called from a subroutine. The ref keyword causes arguments to be passed by reference. While using ref keyword any changes made to the parameter in the method will be reflected in that variable when control passes back to the calling method. A subroutine cannot be called from a function. Functions and subroutines can be called recursively.






9781. That line is straight ..................for the end.





9782. I am always ............ trouble with my neighbours





9783. I know nothing ------- him.





9784. Q.Which one of the following statements about Mycoplasma is wrong?





9785. The teacher had great confidence ............ his student.





9786. For the code snippet given below, which of the following statements is valid? public class Generic<T> { public T Field; } class Program { static void Main(string[ ] args) { Generic<String> g = new Generic<String>(); g.Field = "Hello"; Console.WriteLine(g.Field); } }





9787. For the code snippet given below, which of the following statements are valid? public class MyContainer<T> where T: IComparabte { // Insert code here } Class MyContainer requires that it's type argument must implement IComparabte interface. Type argument of class MyContainer must be IComparabte. Compiler will report an error for this block of code. This requirement on type argument is called as constraint.






9788. 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.






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






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






9791. 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(); } }






9792. 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






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






9794. 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); } }






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





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





9797. Which of these statements is true?





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





9799. ‘Latent’ means:





9800. 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(); } } }






<<= 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 | Powered By:Omega Web Solutions
© 2002-2017 Omega Education PVT LTD...Privacy | Terms And Conditions
Question ANSWER With Solution