Home » Theory of Computation » Theory of computation miscellaneous » Question

Theory of computation miscellaneous

Theory of Computation

  1. The C language is
    1. a context-free language
    2. a context-sensitive language
    3. a regular language
    4. parsable fully only be a turing maching
Correct Option: B

C language is CSL
⚈ In C the grammar is context free.But the language is context sensitive e.g. I can't declare a variable twice.
⚈ Most of the programming languages like C, C+ +, Java etc. can be well approximate by CFG, and the compilers are made taking into account CFGs. However, C language itself contains context sensitive properties which cannot be deal with CFG.



Your comments will be displayed only after manual approval.