Computer Science Engineering (CSE) Exam  >  Computer Science Engineering (CSE) Questions  >  Which is not true about syntax and semantic p... Start Learning for Free
Which is not true about syntax and semantic parts of a computer language
  • a)
    Syntax is generally checked by the programmer.
  • b)
    Semantics is the responsibility of the programmer.
  • c)
    Semantics is checked mechanically by a computer.
  • d)
    Both (b) and (c) above
Correct answer is option 'D'. Can you explain this answer?
Verified Answer
Which is not true about syntax and semantic parts of a computer langua...
Syntax analysis checks for the syntax of the source program while the semantic analysis, deals with checking of semantic (meaning) of the source program output by syntax analysis phase and input to semantic analysis phase.
Note: The syntax checking is responsibility of the programmer while semantic analys is is checked at the runtime.
View all questions of this test
Most Upvoted Answer
Which is not true about syntax and semantic parts of a computer langua...
Syntax and Semantics of a Computer Language

Introduction:
Computer languages are designed with specific rules and structures that govern how programs are written. These rules are divided into two components: syntax and semantics. Syntax refers to the proper arrangement and combination of symbols and keywords, while semantics deals with the meaning and interpretation of those symbols and keywords. In this context, we will discuss the differences between syntax and semantics and why option D is the correct answer.

Syntax:
Syntax defines the correct structure and grammar of a programming language. It specifies the rules for constructing valid statements and expressions in the language. The syntax of a language is typically checked by the programmer during the development process. When a programmer writes code, they need to adhere to the syntax rules of the language to avoid syntax errors. These errors occur when the code violates the language's syntax rules, leading to compilation or interpretation failures.

Semantics:
Semantics, on the other hand, deals with the meaning and interpretation of the code. It determines how statements and expressions are executed and the behavior of the program. While syntax focuses on the form and structure of the code, semantics focuses on the functionality and purpose. Semantics define the rules for assigning meaning to the code constructs and how they interact with each other.

Discussion:
According to the given options, both (b) and (c) are stated to be false. Let's analyze each option to understand why.

Option (b): Semantics is the responsibility of the programmer
This statement is false. While programmers are responsible for understanding and utilizing the semantics of a programming language effectively, they are not solely responsible for defining or determining the semantics. The semantics of a language are defined by its specification or standard, which is typically created by language designers and experts. Programmers need to understand and follow these predefined semantics to write correct and meaningful code.

Option (c): Semantics is checked mechanically by a computer
This statement is also false. Unlike syntax, which can be checked mechanically by a computer through the use of compilers or interpreters, semantics cannot be fully checked by a computer. While computers can detect some semantic errors, such as type mismatches or undefined variables, they cannot determine the intended meaning or correctness of the program's logic. Semantic errors often lead to runtime errors or unexpected program behavior, which can only be identified through testing and debugging by the programmer.

Conclusion:
In conclusion, the correct answer is option D, as both (b) and (c) are false statements. Syntax is generally checked by the programmer, and semantics is not fully checked mechanically by a computer. Programmers are responsible for understanding and utilizing the predefined semantics of a programming language to write correct and meaningful code.
Explore Courses for Computer Science Engineering (CSE) exam

Top Courses for Computer Science Engineering (CSE)

Which is not true about syntax and semantic parts of a computer languagea)Syntax is generally checked by the programmer.b)Semantics is the responsibility of the programmer.c)Semantics is checked mechanically by a computer.d)Both (b) and (c) aboveCorrect answer is option 'D'. Can you explain this answer?
Question Description
Which is not true about syntax and semantic parts of a computer languagea)Syntax is generally checked by the programmer.b)Semantics is the responsibility of the programmer.c)Semantics is checked mechanically by a computer.d)Both (b) and (c) aboveCorrect answer is option 'D'. Can you explain this answer? for Computer Science Engineering (CSE) 2024 is part of Computer Science Engineering (CSE) preparation. The Question and answers have been prepared according to the Computer Science Engineering (CSE) exam syllabus. Information about Which is not true about syntax and semantic parts of a computer languagea)Syntax is generally checked by the programmer.b)Semantics is the responsibility of the programmer.c)Semantics is checked mechanically by a computer.d)Both (b) and (c) aboveCorrect answer is option 'D'. Can you explain this answer? covers all topics & solutions for Computer Science Engineering (CSE) 2024 Exam. Find important definitions, questions, meanings, examples, exercises and tests below for Which is not true about syntax and semantic parts of a computer languagea)Syntax is generally checked by the programmer.b)Semantics is the responsibility of the programmer.c)Semantics is checked mechanically by a computer.d)Both (b) and (c) aboveCorrect answer is option 'D'. Can you explain this answer?.
Solutions for Which is not true about syntax and semantic parts of a computer languagea)Syntax is generally checked by the programmer.b)Semantics is the responsibility of the programmer.c)Semantics is checked mechanically by a computer.d)Both (b) and (c) aboveCorrect answer is option 'D'. Can you explain this answer? in English & in Hindi are available as part of our courses for Computer Science Engineering (CSE). Download more important topics, notes, lectures and mock test series for Computer Science Engineering (CSE) Exam by signing up for free.
Here you can find the meaning of Which is not true about syntax and semantic parts of a computer languagea)Syntax is generally checked by the programmer.b)Semantics is the responsibility of the programmer.c)Semantics is checked mechanically by a computer.d)Both (b) and (c) aboveCorrect answer is option 'D'. Can you explain this answer? defined & explained in the simplest way possible. Besides giving the explanation of Which is not true about syntax and semantic parts of a computer languagea)Syntax is generally checked by the programmer.b)Semantics is the responsibility of the programmer.c)Semantics is checked mechanically by a computer.d)Both (b) and (c) aboveCorrect answer is option 'D'. Can you explain this answer?, a detailed solution for Which is not true about syntax and semantic parts of a computer languagea)Syntax is generally checked by the programmer.b)Semantics is the responsibility of the programmer.c)Semantics is checked mechanically by a computer.d)Both (b) and (c) aboveCorrect answer is option 'D'. Can you explain this answer? has been provided alongside types of Which is not true about syntax and semantic parts of a computer languagea)Syntax is generally checked by the programmer.b)Semantics is the responsibility of the programmer.c)Semantics is checked mechanically by a computer.d)Both (b) and (c) aboveCorrect answer is option 'D'. Can you explain this answer? theory, EduRev gives you an ample number of questions to practice Which is not true about syntax and semantic parts of a computer languagea)Syntax is generally checked by the programmer.b)Semantics is the responsibility of the programmer.c)Semantics is checked mechanically by a computer.d)Both (b) and (c) aboveCorrect answer is option 'D'. Can you explain this answer? tests, examples and also practice Computer Science Engineering (CSE) tests.
Explore Courses for Computer Science Engineering (CSE) exam

Top Courses for Computer Science Engineering (CSE)

Explore Courses
Signup for Free!
Signup to see your scores go up within 7 days! Learn & Practice with 1000+ FREE Notes, Videos & Tests.
10M+ students study on EduRev