3i Infotech Placement: Sample Questions 325 - 326 of 1245

Glide to success with Doorsteptutor material for competitive exams : get questions, notes, tests, video lectures and more- for all subjects of your exam.

Question 325

Question

MCQ▾

A man speaks the truth out of times. He throws a die and reports it to be a . What is the probability of it being a ?

Choices

Choice (4)

a.

b.

c.

d.

All of the above

Answer

a.

Explanation

Probability of getting on a die

Probability of not getting

Probability of the man getting on a die and reporting it as

Truth .

Probability of the man NOT getting in a die and reporting it as

Lying

Required probability is the probability of getting the and the man not lying,

Question 326

Edit

Describe in Detail

Essay▾

How are exceptions handled in PL/SQL? Give some of the internal exceptions ′ name

Explanation

  • Exceptions are run-time errors from design faults, coding mistakes, hardware failures, and many other sources.
  • Not be captured at the time of compilation and hence are handled only at the run-time.
  • Example- if PL/SQL engine receives an instruction to divide any number by ‘0’ then an exception is thrown.
  • Only raised at the run-time by the PL/SQL engine.

There are two type of exceptions:

  1. System-defined Exceptions
  2. User-defined Exceptions

System-Defined Exceptions

  • Two types of system defined exception
    • Named system exceptions
    • Un-named system exceptions.
  • Named system exceptions:
    • Predefined exceptions created by the SQL to handle the known types of errors.
    • They are defined by the SQL and need not be redefined by the user.
    • For example, ‘ZERO_DIVIDE’ is the predefined exception to handle division by zero.
  • Un-named system exceptions:
    • Have predefined error numbers and error code/message.
    • Do not occur as frequently as named exceptions.

User -Define Exception

  • Defined by the developers based on the business rules.
  • Are declared and assigned error code and names and handled in the exception block by calling the names as we do it in other exceptions.

Developed by: