Can’t find an answer?

Can’t find an answer?

Ask us to get the answer

  • This forum is empty.

Which of these keywords are used for the block to handle the exceptions generated by try block?

(a) try

(b) catch

(c) throw

(d) check

The question was posed to me by my college director while I was bunking the class.

Asked question is from Try & Catch in Detail topic in portion Indexers and Exception Handling of C#

  • C#
  • November 12, 2023 at 5:06 am

Which of the keywords are used for the block to be examined for exceptions?

(a) try

(b) catch

(c) throw

(d) check

The question was posed to me in class test.

My question comes from Try & Catch in Detail topic in portion Indexers and Exception Handling of C#

  • C#
  • November 8, 2023 at 5:06 am

Choose the statement which is incorrect?

(a) try block does not need to be followed by catch block

(b) try block can be followed by finally block instead of catch block

(c) try can be followed by both catch and finally block

(d) try need not to be followed by anything

I have been asked this question by my school teacher while I was bunking the class.

Question is taken from Try & Catch in Detail in section Indexers and Exception Handling of C#

  • C#
  • September 5, 2023 at 5:06 am

What is the use of try & catch?

(a) It is used to manually handle the exception

(b) It helps to fix the errors

(c) It prevents automatic terminating of the program in cases when an exception occurs

(d) All of the mentioned

I had been asked this question at a job interview.

The doubt is from Try & Catch in Detail in portion Indexers and Exception Handling of C#

  • C#
  • September 19, 2023 at 5:06 am

Which of these classes is related to all the exceptions that are explicitly thrown?

(a) Error

(b) Exception

(c) Throwable

(d) Throw

I have been asked this question during an interview.

I want to ask this question from Exceptions of Type Finally and Built in Exceptions topic in section Indexers and Exception Handling of C#

  • C#
  • October 5, 2023 at 5:06 am

Which of the following keywords is used by the calling function to guard against the exception that is thrown by called function?

(a) try

(b) throw

(c) throws

(d) catch

I got this question in unit test.

This question is from Exceptions of Type Finally and Built in Exceptions topic in portion Indexers and Exception Handling of C#

  • C#
  • September 26, 2023 at 5:06 am

Which of these exceptions will occur if we try to access the index of an array beyond its length?

(a) ArithmeticException

(b) ArrayException

(c) ArrayArguementException

(d) IndexOutOfRangeException

This question was addressed to me in final exam.

The question is from Exceptions of Type Finally and Built in Exceptions in chapter Indexers and Exception Handling of C#

  • C#
  • September 7, 2023 at 5:06 am

A single try block must be followed by which of these?

(a) finally

(b) catch

(c) Both finally & catch

(d) None of the mentioned

The question was asked in an internship interview.

This intriguing question comes from Exceptions of Type Finally and Built in Exceptions in section Indexers and Exception Handling of C#

  • C#
  • September 7, 2023 at 5:06 am

Which of these exceptions handles the divide by zero error?

(a) ArithmeticException

(b) MathException

(c) IllegalAccessException

(d) IllegarException

The question was posed to me during an online interview.

Query is from Exceptions of Type Finally and Built in Exceptions topic in portion Indexers and Exception Handling of C#

  • C#
  • September 14, 2023 at 5:06 am

Which of these clauses will be executed even if no exceptions are found?

(a) throws

(b) finally

(c) throw

(d) catch

The question was asked in examination.

The doubt is from Exceptions of Type Finally and Built in Exceptions in portion Indexers and Exception Handling of C#

  • C#
  • October 25, 2023 at 5:06 am

Viewing 15 topics - 196 through 210 (of 257 total)

1 2 3 13 14 15 16 17 18
  • You must be logged in to create new topics.