in Programming in C
10,079 views
35 votes
35 votes

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
in Programming in C
10.1k views

1 comment

1
1

3 Answers

78 votes
78 votes
Best answer

Answer is (B).

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.
edited by

2 Comments

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

4 Comments

Reference link is not working.

I found C is a CFG language.

http://poj.org/problem?id=3220
–1
–1
@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 ??
0
0
that is telling about C++ and reason being templates. C grammar should be context sensitive..
2
2

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

2
2
–2 votes
–2 votes
ans b)

1 comment

Your answers are $WORST$ on GO
2
2
Answer:

Related questions