ExamVeda
Login
Home
31
Choose the method defined by MemberInfo.
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
32
Which among the following is the correct statement about the using statement used in C#.NET?
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
33
Which of these methods of class String is used to extract a substring from a String object?
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
34
What will be the output of the following C# code snippet?
class Program
{
    static void Main(string[] args)
    {
        char []chars = {'a', 'b', 'c'};
        String s = new String(chars);
        Console.WriteLine(s);
        Console.ReadLine();
    }
}
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
35
If ListBox is the class of System.Windows.Forms namespace. Then, the correct way to create an object of ListBox class is?
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
36
What will be the output of the following C# code snippet?
unsafe static void Main()
{
    int a = 5;
    int b = 5;
    int c = 5;
    int*[] ptr = new int* [3];
    ptr[0] = &a;
    ptr[1] = &b;
    ptr[2] = &c;
    for (a = 0; a < 3; a++)
    {
        c += *ptr[a];
        Console.WriteLine(c);
    }
    Console.ReadLine();
}
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
37
What will be the output of the following C# code snippet?
static void Main(string[] args)
{
    string s1 = "Hello" + "c" + "Sharp";
    Console.WriteLine(s1);
    Console.ReadLine();
}
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
38
Which of these methods of class String is used to check whether a given string starts with a particular substring or not?
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
39
What will be the output of the following C# code snippet?
class static_out
{
    public static int x;
    public  static int y;
    public int add(int a, int b)
    {
        x = a + b;
        y = x + b;
        return 0;
    }
}    
class Program
{
    static void Main(string[] args)
    {
        static_out obj1 = new static_out();
        static_out obj2 = new static_out();   
        int a = 2;
        obj1.add(a, a + 1);
        obj2.add(5, a);
        Console.WriteLine(static_out.x + " " + static_out.y );     
        Console.ReadLine();
    }
}
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
40
What will be the output of the following C# code snippet?
class MyClass
{
    char ch = 'A';
    int e = 4;
    int k = 9;
    int z = 6;
    public IEnumerator GetEnumerator()
    {
        for (int i = 0; i < 26; i++)
        {
            if (i == e*k /z) yield break; 
            yield return (int)(ch + i);
        }
    }
}
class Program
{
    static void Main(string[] args)
    {
        MyClass mc = new MyClass();
        foreach(int ch in mc)
        Console.Write(ch + " ");
        Console.WriteLine();
        Console.ReadLine();
    }
}
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board