ExamVeda
Login
Home
41
What is the return type of the IndexOf() method when applied to a string in C#?
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
42
What is the purpose of the params keyword in C# method parameters?
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
43
In C#, which keyword is used to exit from a method without returning any value?
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
44
What is the correct syntax to define a method named GetMax that takes two integer parameters num1 and num2 and returns the maximum of the two numbers in C#?
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
45
Which of these methods is executed first before execution of any other thing that takes place in a program?
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
46
Which of these can be used to differentiate two or more methods having same name?
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
47
Which of these data types can be used for a method having a return statement in it?
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
48
What will be the output of the following C# code snippet?
class box
{
    public  int width;
    public int height;
    public int length;
    public  int volume1;
    public void volume()
    {
        volume1 = width * height * length;
    }
    public void volume(int x)
    {
        volume1 = x;
    }
}    
class Program
{
    static void Main(string[] args)
    {
        box obj = new box();
        obj.height = 1;
        obj.length = 5;
        obj.width = 5;
        obj.volume(5);
        Console.WriteLine(obj.volume1);        
        Console.ReadLine();
    }
}
a) 0
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
49
Which of these data types can be used for a method having a return statement in it?
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
50
What is the process of defining more than one method in a class differentiated by parameters known as?
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board