ExamVeda
Login
Home
41
When we call a constructor method among different given constructors. We match the suitable constructor by matching the name of constructor first, then the number and then the type of parameters to decide which constructor is to be overloaded. The process is also known as?
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
42
Which method has the same name as that of its class?
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
43
Wrong statement about run time polymorphism is?
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
44
What will be the output of the following C# code?
class recursion 
{
    int fact(int n) 
    {
        int result;
        if (n == 1)
        return 1;
        result = fact(n - 1) * n;
        return result;
    }
} 
class Program 
{
    public static void main(String args[]) 
    {
        recursion obj = new recursion() ;
        Console.WriteLine(obj.fact(4));
    }
}
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
45
Which of the following statements are correct?
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
46
Correct statement about constructors in C#.NET is?
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
47
Which of the following modifiers is used when an abstract method is redefined by a derived class?
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
48
What will be the output of the following C# code?
static void Main(string[] args)
{
    int[] arr = new int[] {1, 2, 3, 4, 5};
    fun1(ref arr);
    Console.ReadLine();
 }
static void fun1(ref int[] array)
{
    for (int i = 0; i < array.Length; i++)
    {
        array[i] = array[i] + 5;
        Console.WriteLine(array[i] + " ");
    }
}
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
49
Choose the correct statement among the below mentioned statements.
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
50
What will be the output of the following C# code?
static void Main(string[] args)
{
   int a = 5;
   fun1 (ref a);
   Console.WriteLine(a);
   Console.ReadLine();
}
static void fun1(ref int a)
{
    a = a * a;
}
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board