6,323 views

The C language is:

1. A context free language
2. A context sensitive language
3. A regular language
4. Parsable fully only by a Turing machine

### Subscribe to GO Classes for GATE CSE 2022

All modern programming languages are CSL. Because they contain two features which cannot be handled by PDA.

The features are:

• variable declared before use and
• matching formal and actual parameters of functions.

For anyone wondering, this (both context sensitive constructs) is mentioned explicitly in the compilers dragon book.

I found C is a CFG language.

http://poj.org/problem?id=3220
@Arjun sir, According to the accepted answer of  http://stackoverflow.com/questions/14589346/is-c-context-free-or-context-sensitive  the answer should be D too ??
that is telling about C++ and reason being templates. C grammar should be context sensitive..

@Arjun SIR
What about JAVA  and Python ?  How to answwer this kind of questions ? :(

ans b)

### 1 comment

Your answers are $WORST$ on GO