Which of the following statements is correct about the C#.NET program given below if a value "ABCD" is input to it? using System; namespace IndiabixConsoleApplication { class MyProgram { static void Main(string[] args) { int index; int vat = 88; int[] a = new int(5]; try { Console.Write("Enter a number: "); index = Convert.Toint32(Console.ReadLine()); a[index] = val; } catch(Exception e) { Console.Write("Exception occurred"); } Console.Write("Remaining program"); } } }

- Online Exam Test Papers | - MCQs[multiple choice questions and answers ] | - Mock Test Papers | - Practice Papers | - Sample Test Papers |

Question:
Which of the following statements is correct about the C#.NET program given below if a value "ABCD" is input to it?

using System;
namespace IndiabixConsoleApplication
{
    class MyProgram
    {
        static void Main(string[] args)
        {
            int index; 
            int vat = 88;
            int[] a = new int(5];
            try
            {
                Console.Write("Enter a number: ");
                index = Convert.Toint32(Console.ReadLine());
                a[index] = val;
            }
            catch(Exception e)
            {
                Console.Write("Exception occurred");
            }
            Console.Write("Remaining program");
        }
    }
}

1.It will output: Exception occurred

2.It will output: Remaining program

3. It will output: Remaining program Exception occurred

4. It will output: Exception occurred Remaining program

Posted Date:-2021-02-25 10:08:49


More MCQS Questions and answers

Search
R4R Team
R4Rin Top Tutorials are Core Java,Hibernate ,Spring,Sturts.The content on R4R.in website is done by expert team not only with the help of books but along with the strong professional knowledge in all context like coding,designing, marketing,etc!