MCQ IN COMPUTER SCIENCE & ENGINEERING

COMPUTER SCIENCE AND ENGINEERING

COMPILER DESIGN

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
Words such as if, then, else are examples for
A
terminals
B
non-terminals
C
productions
D
start symbol
Explanation: 

Detailed explanation-1: -Example. In this example, the symbols (-, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9) are terminal symbols and <digit> and <integer> are nonterminal symbols. In this example, the symbols a, b, c, d are terminal symbols and S, A are nonterminal symbols.

Detailed explanation-2: -A terminal is a window into which you can type commands that are then executed by your computer’s operating system. The cursor point in the terminal where you type is called the command line, and so a terminal is sometimes also referred to as a command-line interface (CLI).

Detailed explanation-3: -Terminal symbols in grammar are static, unchangeable and cannot be replaced. Nonterminal symbols in grammar can be replaced.

Detailed explanation-4: -Terminals = symbols of the alphabet of the language being defined. ◆ Variables = nonterminals = a finite set of other symbols, each of which represents a language. ◆ Start symbol = the variable whose language is the one being defined.

There is 1 question to complete.