ExamVeda
Login
Home
21
Which of these will happen if the recursive method does not have a base case?
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
22
Which operator among the following signifies the destructor operator?
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
23
What will be the output of the following C# code?
static void Main(string[] args)
{
    int []a = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10};
    func(ref a);
    Console.ReadLine();
}
static void func(ref int[] x)
{
    Console.WriteLine(" numbers are:");
    for (int i = 0; i < x.Length; i++)
    {
        if (x[i] % 2 == 0)
        {
            x[i] = x[i] + 1;
            Console.WriteLine(x[i]);
        }
    }
}
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
24
What will be the output of the following C# code?
enum letters
{
    a,
    b,
    c
} 
letters l;
l = letters.a;
Console.writeline(l);
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
25
What will be the output of the following C# code?
static void Main(string[] args)
{
    int y = 3;
    y++;
    if (y <= 5)
    { 
        Console.WriteLine("hi");
        Main(args);
    }
    Console.ReadLine();
}
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
26
What will be the output of the following C# code?
class maths
{
    public int fun(int ii)
    {
        return(ii > 0 ? ii :ii * -1);
    }
    public long fun(long ll)
    {
        return(ll > 0 ? ll :ll * -1);
    }
    public double fun( double dd)
    {
        return(dd > 0 ? dd :dd * -1);
    }
}    
class Program
{
    static void Main(string[] args)
    {
        maths obj = new maths();
        int i = -25;
        int j ;
        long l = -100000l ;
        long m;
        double d = -12.34;
        double e;
        j = obj.fun(i);
        m = obj.fun(l);
        e = obj.fun(d);
        Console.WriteLine(j + "  " + m + "  " + e);
        Console.ReadLine();
    }
}
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
27
In Inheritance concept, which of the following members of base class are accessible to derived class members?
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
28
Choose the wrong statement about structures in C#.NET?
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
29
A type of class which does not have its own objects but acts as a base class for its subclass is known as?
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
30
What will be the output of the following C# code?
class maths
{
    public int fun1(int k)
    {
        k = 20;
        return k;
    }
    public Single fun1(float t)
    {
        t = 3.4f;
        return t;
    }
}  
class Program
{
    static void Main(string[] args)
    {
        maths obj = new maths();
        int i;
        i = obj.fun1(30);
        Console.WriteLine(i);
        Single j;
        j = obj.fun1(2.5f);
        Console.WriteLine(j);
        Console.ReadLine();
    }
}
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board