Q. Which of the following errors are identified by the compiler?
Answer: Syntax Errors
Notes: Syntax errors or diagnostic errors are identified by the compiler. These errors occur when a program does not conform to the grammar of a programming language, and the compiler cannot compile the source file. A syntax error is an error in the syntax of a sequence of characters or tokens that is intended to be written in a particular programming language. Common syntax errors include missing or misplaced ';' or '}', missing return type for a procedure, missing or duplicate variable declaration, type mismatch on assignment, type mismatch between actual and formal parameters, etc. Logic errors occur when a program does not do what the programmer expects it to do. Since these errors are due to wrong logic in the program, logic errors cannot be identified by the compiler; they are detected only when the program is executed.
Question Source: 📚This question has been sourced from GKToday's "40000+ GK / General Studies MCQs for SSC & State PCS Exams" App Exclusive Course in GKToday Android Application which provides more than 40K General Knowledge and General Studies questions with explanations asked in all Competitive Exams of India. Download the app here.
📌 Question Number: 98 in General Studies Mock Test - 32 in the above course in App.

This Question is Also Available in:

हिन्दीಕನ್ನಡ