COMPUTER PROGRAMMING FUNDAMENTALS
PROGRAMMING LANGUAGES
Question
[CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
|
|
Programming language
|
|
Formal language
|
|
Natural language
|
|
None of the above
|
Detailed explanation-1: -Formal languages are defined by two sets of rules: – Syntax: precise rules that tell you the symbols you are allowed to use and how to put them together into legal expressions. – Semantics: precise rules that tell you the meanings of the symbols and legal expressions.
Detailed explanation-2: -Definition. A formal language L over an alphabet is a subset of *, that is, a set of words over that alphabet. Sometimes the sets of words are grouped into expressions, whereas rules and constraints may be formulated for the creation of ‘well-formed expressions’.
Detailed explanation-3: -In automata theory, a formal language is a set of strings of symbols drawn from a finite alphabet. A formal language can be specified either by a set of rules (such as regular expressions or a context-free grammar) that generates the language, or by a formal machine that accepts (recognizes) the language.
Detailed explanation-4: -Syntax refers to the rules that define the structure of a language. Syntax in computer programming means the rules that control the structure of the symbols, punctuation, and words of a programming language. Without syntax, the meaning or semantics of a language is nearly impossible to understand.