MCQ IN COMPUTER SCIENCE & ENGINEERING

COMPUTER SCIENCE AND ENGINEERING

THEORY OF COMPUTATION

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
A ____ is an ordered, rooted tree that represents the syntactic structure of a string according to some context-free grammar.
A
Parse Tree
B
Logical Tree
C
Function Tree
D
File Tree
Explanation: 

Detailed explanation-1: -A parse tree or parsing tree or derivation tree or concrete syntax tree is an ordered, rooted tree that represents the syntactic structure of a string according to some context-free grammar.

Detailed explanation-2: -Context-free grammars are often used to define the syntax of programming languages. A parse tree displays the structure used by a grammar to generate an input string. Parse trees are typically used within a compiler to give structure to an input program in terms of the syntactic rules used to define valid programs.

Detailed explanation-3: -Parse trees are typically more detailed and larger than syntax trees, as they contain more information about the source code. Syntax trees are simpler and more abstract, as they only include the information necessary to generate machine code or intermediate code.

Detailed explanation-4: -In computer science, an abstract syntax tree (AST), or just syntax tree, is a tree representation of the abstract syntactic structure of text (often source code) written in a formal language. Each node of the tree denotes a construct occurring in the text.

Detailed explanation-5: -A syntax tree is a representation of the structure of a single sentence – of the way that the individual words are grouped into phrases and eventually form the full sentence.

There is 1 question to complete.