Machine-translated by Google. Questions are authored in English.
Top

Discussion

The "C" language is

  • A.Context free language
  • B.Context sensitive language
  • C.Regular language
  • D.None of the above

Answer: A

The key's answer is Context free language.

The syntax of C is defined by a context-free grammar, given in BNF in the language standard, and C compilers parse it with context-free parsing methods such as LR parsers generated by yacc.

Strictly, a few rules, such as declaring a variable before use and telling typedef names from identifiers, depend on context and are checked with the symbol table outside the grammar. C is certainly not regular: nested brackets and blocks need a stack, which a finite automaton lacks.

No comment is present. Be the first to comment.
Loading…

Post your comment

Please log in or register to post a comment.