खालीलपैकी कोणते सिंटॅक्स त्रुटी शोधते आणि त्या प्रोग्रॅमरला रिपोर्ट करते ?
EN
Which of the following detects syntax errors and reports them to the programmer?
योग्य उत्तर: पर्याय ३ (कंपायलर / Compiler)
स्पष्टीकरण:
•
कंपायलर (Compiler): हा एक सिस्टीम सॉफ्टवेअर (भाषांतरकार - Language Translator) आहे जो उच्च-स्तरीय प्रोग्रामिंग भाषेत (High-Level Language - C, C++, Java) लिहिलेला संपूर्ण सोर्स कोड मशीन भाषेत (मशीन कोड - 0 आणि 1) रूपांतरित करतो.
•
त्रुटी शोधणे: प्रोग्राम कंपाईल करताना जर प्रोग्रामरने व्याकरणाचे (प्रोग्रामिंग भाषेचे नियम) उल्लंघन केले असेल, तर कंपायलर सर्व सिंटॅक्स त्रुटी (Syntax Errors) शोधून काढतो आणि त्या ओळ क्रमांकासह (Line numbers) प्रोग्रामरला एरर लिस्टद्वारे रिपोर्ट करतो.
•
जोपर्यंत सर्व सिंटॅक्स एरर्स दुरुस्त केल्या जात नाहीत, तोपर्यंत कंपायलर एक्झिक्युटेबल फाईल (.exe) तयार करत नाही.
MPSC परीक्षा टीप
परीक्षेसाठी महत्त्वपूर्ण संकल्पना व शॉर्टकट
•
Compiler: संपूर्ण प्रोग्राम एकाच वेळी तपासून सर्व सिंटॅक्स त्रुटी एकत्र रिपोर्ट करतो.
•
Interpreter: प्रोग्राम एका वेळी एक ओळ (Line-by-line) तपासून तात्काळ त्रुटी दाखवतो.
translate
English Explanation / स्पष्टीकरण:
Correct Answer: Option 3 (Compiler / कंपायलर)
Explanation:
•
A Compiler is a systems language processor that translates an entire high-level source program (e.g., in C, C++, or Rust) into low-level machine code or object code.
•
During lexical and syntactic parsing phases, the compiler checks the code against the strict grammatical rules of the programming language.
•
When grammatical violations occur, the compiler detects these syntax errors and generates a detailed diagnostic compilation report displaying line numbers and error descriptions to the programmer.
MPSC EXAM TIP
High-Yield Exam Strategy Tip
A Compiler parses source code and reports syntax errors to the programmer before generating machine code.