Explore topic-wise MCQs in Attributes .

This section includes 5 Mcqs, each offering curated multiple-choice questions to sharpen your Attributes knowledge and support exam preparation. Choose a topic below to get started.

1.

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

A. It will output: Bad Format
B. It will output: Remaining program
C. It will output: Index out of bounds
D. It will output: Bad Format Remaining program
Answer» E.
2.

Which of the following statements are correct about the exception reported below? Unhandled Exception: System.lndexOutOfRangeException: Index was outside the bounds of the array. at IndiabixConsoleApplication.Program.Main(String[] args) in D:ConsoleApplicationProgram.cs:line 14

A. 1 only
B. 1, 2 and 3 only
C. 2 and 5 only
D. 1, 3 and 4 only
Answer» E.
3.

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

A. It will output: Index out of bounds Remaining program
B. It will output: Bad Format Remaining program
C. It will output: Bad Format
D. It will output: Remaining program
Answer» B. It will output: Bad Format Remaining program
4.

Which of the following statements are correct about the exception reported below? Unhandled Exception: System.lndexOutOfRangeException: Index was outside the bounds of the array: at IndiabixConsoleApplication.MyProgram.SetVal(Int32 index, Int32 val) in D:SampleIndiabixConsoleApplicationMyProgram.cs:line 26 at IndiabixConsoleApplication.MyProgram.Main(String[] args) in D:SampleIndiabixConsoleApplicationMyProgram.cs:line 20

A. 1 only
B. 1 and 2 only
C. 3, 4 and 5 only
D. All of the above
Answer» D. All of the above
5.

Which of the following statements are correct about exception handling in C#.NET?

A. 1 only
B. 2 only
C. 2 and 5 only
D. 3 and 4 only
Answer» D. 3 and 4 only