NSCT – Exception & Error Handling MCQs

20 min Score: 0 Attempted: 0/20 Subscribe
1. What is an exception in programming?





2. What is error handling?





3. Which of the following is an example of a runtime error?





4. Which of the following is an example of a compile-time error?





5. What is an exception handler?





6. Which keyword is commonly used to handle exceptions in many programming languages?





7. What does the try block do?





8. What does the catch block do?





9. What is the purpose of the finally block?





10. Which of the following is used to raise an exception manually?





11. Which type of error can be handled using exception handling?





12. Which of the following is an example of a logical error?





13. What happens if an exception is not handled?





14. Which of the following statements is true about exceptions?





15. Which type of exception occurs when a program tries to access a file that does not exist?





16. Which exception occurs when trying to access an invalid index in a collection?





17. Which exception occurs when attempting to use a null reference?





18. Why is exception handling important?





19. Which of the following is used to clean up resources, like closing files, after exception handling?





20. What is the main goal of exception and error handling in programming?





All Copyrights Reserved 2025 Reserved by T4Tutorials