Error Detection and Recovery Mechanisms MCQs

30 min Score: 0 Attempted: 0/30 Subscribe
1. What is the main goal of error detection in compilers?





2. Which phase of compilation primarily detects syntax errors?





3. Which type of errors is typically detected during lexical analysis?





4. What is the purpose of semantic error detection?





5. Which error recovery technique discards input symbols until a designated token is found?





6. Which method attempts to make minimal local changes to continue parsing after an error?





7. What is a synchronizing token in error recovery?





8. Which type of error is a “semantic error”?





9. What is a “lexical error”?





10. Which recovery strategy is easiest to implement?





11. What is a cascading error?





12. What is the main disadvantage of panic mode recovery?





13. Which recovery method is safer for preserving parse structure?





14. In phrase-level recovery, which operations are commonly used?





15. What is the primary goal of error recovery?





16. Which error detection mechanism checks for undefined variables and type mismatches?





17. What is the function of an error handler in a compiler?





18. Which type of error is detected at runtime rather than compile-time?





19. In error recovery, what is the term “local repair”?





20. Which phase is most responsible for detecting missing semicolons?





21. Which type of error does a type checker primarily detect?





22. Why is error recovery important in large programs?





23. Which of the following is a common panic mode recovery approach?





24. Phrase-level recovery is most effective for:





25. Which recovery method may introduce cascading errors if used incorrectly?





26. Which error recovery strategy is typically combined with semantic analysis?





27. In panic mode recovery, how does the parser decide where to resume?





28. Which is a key feature of error detection in compilers?





29. Which phase might detect division by zero as a compile-time error?





30. What is the relationship between error detection and error recovery?





Leave a Comment

All copyrights Reserved by MCQsAnswers.com - Powered By T4Tutorials