ExamVeda
Login
Home
1
What will be the output of the following C# code snippet?
class Output 
{
    public static void main(String args[]) 
    {
        try 
        {
            int a = 10;
            int b = 5;
            int c =  b - 5 / 5;
            Console.WriteLine("Hi");
        }
        catch(Exception e) 
        {
            Console.WriteLine("hello");
        } 
    }
}
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
2
Choose the correct alternative that utilizes the indexed property such that a group named class has indexed property which stores or retrieves value to/from an array of 5 numbers?
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
3
Which among the following are the advantages of using indexers?
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
4
What will be the output of the following C# code snippet?
class Program
{
    static void Main(string[] args)
    {
        int i;
        int v = 40;
        int[] x = new int[5];
        try
        {
            Console.WriteLine(" Enter the number: ");
            index = Convert.ToInt32(Console.ReadLine());
            x[index] = v;
        }
        catch(Exception e)
        {
            Console.WriteLine("Exception occurred");
        }
        Console.WriteLine("Program executed");
    }
}
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
5
Which of these keywords must be used to monitor exceptions?
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
6
Select the correct statement about properties of read and write in C#.NET?
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
7
Consider a class maths and we had a property called a sum.b is a reference to a maths object and we want the statement b.sum = 10 to fail. Which of the following is the correct solution to ensure this functionality?
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board