The Gateway to Computer Science Excellence
+18 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 by Veteran (52.2k points) | 2.7k views

3 Answers

+38 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.
by Boss (17.6k points)
edited by
+13 votes
by Boss (33.8k points)
Reference link is not working.

I found C is a CFG language.
@Arjun sir, According to the accepted answer of  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 ? :(

–2 votes
ans b)
by Loyal (5.2k points)

Related questions

Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
50,648 questions
56,422 answers
99,834 users