ExamVeda
Login
Home
51
What will be the output of the following C# code?
static void Main(string[] args)
{
    String a = "Ilove";
    String b = "CSHARP";
    b = string.Concat(a, '  ', b);
    Console.WriteLine(b);
    Console.ReadLine();
}
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
52
What will be the output of the following C# code?
static void Main(string[] args)
{
    String obj = "hello";
    String obj1 = "world";   
    String obj2 = obj;
    string s = obj+" "+obj1;
    Console.WriteLine(s.IndexOf('r'));
    Console.ReadLine();
}
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
53
What does the term 'immutable' means in term of string objects?
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
54
Accessibility modifier defined in a class are?
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
55
Which of these methods is an alternative to getChars() that stores the characters in an array of bytes?
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
56
What will be the output of the following C# code?
static void main(string[] args)
{
    int i;
    int res = fun (out i);
    console.writeline(res);
    console.readline();
}
static int fun(out int i)
{
    int s = 1;
    i = 7;
    for (int j = 1; j <= i; j++ )
    s = s * j;
    return s;
}
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
57
What will be the output of the following C# code?
static void Main(string[] args)
{
    String obj = "hello";
    String obj1 = "world";   
    String obj2 = obj;
    string s = obj + "  " + obj1;
    Console.WriteLine(s.Substring(6 ,5));
    Console.ReadLine();
}
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
58
What will be the output of the following C# code?
static void Main(string[] args)
{
    int i, j;
    int[, ] arr = new int[ 3, 3];
    for (i = 0; i < 3; ++i)
    {
        for (j = 0; j < 3; ++j)
        {
            arr[i, j] = i * 2 + i * 2;
            Console.WriteLine(arr[i, j]);
        }
        Console.ReadLine();
    }
}
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
59
The modifiers used to define an array of parameters or list of arguments is . . . . . . . .
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
60
What will be the output of the following C# code?
static void Main(string[] args)
{
    object[] a = {" 1 ", 4.0f, " harsh "};
    fun(a);
    Console.ReadLine();
}
static void fun(params object[] b)
{
    for (int i = 0; i < b.Length - 1; i++)
        Console.WriteLine(b[i] + " ");
}
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board