ExamVeda
Login
Home
51
What will be the output of the following C# code?
class Output 
{
    public static void main(String args[]) 
    {
        try 
        {
            int a = 10;
            int b = 5;
            int c = a / b - 5;
            Console.WriteLine("Hi");
        }
        catch(Exception e) 
        {
            Console.WriteLine("hello");
        } 
    }
}
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
52
Choose the wrong statement about the properties used in C#.NET?
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
53
Which of these keywords is not a part of exception handling?
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
54
Which of the following is the object oriented way to handle run time errors?
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
55
What will be the output of the following C# code snippet?
class program
{
    public static void Main(string[] args)
    {
        try
        {
            throw new NullReferenceException("C");
            Console.WriteLine("A");
        }
        catch (ArithmeticException e) 
        {
            Console.WriteLine("B");
        }
        Console.ReadLine();
    }
}
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
56
What will be the output of the following C# code snippet?
class program
{
    public static void Main(string[] args)
    {
        try 
        {
            int a = args.Length;
            int b = 1 / a;
            Console.WriteLine(a);
        }
        catch (ArithmeticException e) 
        {
            Console.WriteLine("1");
        }
        Console.ReadLine();
    }
}
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?
class Output 
{
    public static void main(String args[]) 
    {
       try 
       {
           int a = 5;
           int b = 10;
           int c = b / a - 5;
           Console.WriteLine("Csharp");
       } 
   }
}
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
58
Choose the correct statement among the following?
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
59
Which of these keywords are used for generating an exception manually?
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
60
Choose the keyword which declares the indexer?
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board