ExamVeda
Login
Home
61
Select the correct match of parameter declaration.
static Void main(string[] args)
{
    int a = 5;
    int b = 6;
    float c = 7.2f;
    math (ref a, ref b, ref c);
    Console.WriteLine(a + "  " + b + "  " + c);
}
static int math(/*add parameter declaration */)
{
    a += b;
    b *= (int)c;
    c += a * b;
    return 0;
}
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
62
What will be the output of the following C# code?
static void Main(string[] args)
{
    int[] x = { 80, 82, 65, 72, 83, 67 };
    fun(x);
    Console.ReadLine();
}
static void fun(params int [] b )
{
    int i;
    for (i = 5; i >=0 ; i--)
    {
        Console.WriteLine(Convert.ToChar(b[i]));
    }
}
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
63
What will be the output of the following C# code snippet?
static void Main(string[] args)
{
    string c = "hello";
    string  c1 = c.Remove(1);
    Console.WriteLine(c1);
    Console.ReadLine();
}
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
64
Which method does following C# code explains?
static void Main(string[] args)
{
    int a = 10, b = 20;
    method(ref a,  ref b);
    console.writeline(a + "  " + b);
}
static void swap(ref int i,  ref int j)
{  
    int t;
    t = i;
    i = j;
    j = t;
}
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
65
What will be the output of the following C# code?
 static void Main(string[] args)
 {
     int [] a = {1, 2, 3, 4, 5};
     fun(a);
     Console.ReadLine();
 }
 static void fun(params int[] b )
 {
     for (int i = 0; i < b.Length; i++)
     {
         b[i] = b[i] * 5 ;
         Console.WriteLine(b[i] + "");
     }
 }
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
66
Which of these data type values is returned by equals() method of String class?
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
67
Which statement is correct about following C# code?
int[, ]a={{5, 4, 3},{9, 2, 6}};
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
68
What will be the output of the following C# code?
class Program
{
    static void Main(string[] args)
    { 
        String s1 = "I love You";
        String s2 = s1;
        Console.WriteLine((s1 == s2) + " " + s1.Equals(s2));
        Console.ReadLine();
    }
}
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
69
Correct way to convert a string to uppercase using string class method()?
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
70
What will be the output of the following C# code?
static void Main(string[] args)
{
    string s = " i love you";
    Console.WriteLine(s.IndexOf('l') + "  " + s.lastIndexOf('o') + "  " + s.IndexOf('e'));
    Console.ReadLine();
}
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board