35 votes 35 votes The C language is: A context free language A context sensitive language A regular language Parsable fully only by a Turing machine Programming in C gatecse-2002 programming programming-in-c normal + – Kathleen asked Sep 15, 2014 Kathleen 10.2k views answer comment Share Follow See 1 comment See all 1 1 comment reply VIKAS TIWARI commented Jul 17, 2018 reply Follow Share https://www.geeksforgeeks.org/c-language-set-3/ 1 votes 1 votes Please log in or register to add a comment.
Best answer 78 votes 78 votes 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. Sachin Mittal 1 answered Dec 20, 2016 • edited Jun 15, 2018 by Milicevic3306 Sachin Mittal 1 comment Share Follow See all 2 Comments See all 2 2 Comments reply Sachin Mittal 1 commented Dec 27, 2016 reply Follow Share See this question https://gateoverflow.in/463/gate2008-51 9 votes 9 votes pritishc commented Dec 12, 2019 reply Follow Share For anyone wondering, this (both context sensitive constructs) is mentioned explicitly in the compilers dragon book. 3 votes 3 votes Please log in or register to add a comment.
14 votes 14 votes Answer: (B) Ref: http://trevorjim.com/c-and-cplusplus-are-not-context-free/ Rajarshi Sarkar answered Mar 31, 2015 Rajarshi Sarkar comment Share Follow See all 4 Comments See all 4 4 Comments reply bahirNaik commented Dec 15, 2015 reply Follow Share Reference link is not working. I found C is a CFG language. http://poj.org/problem?id=3220 –1 votes –1 votes learncp commented Dec 30, 2015 reply Follow Share @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 votes 0 votes Arjun commented Dec 30, 2015 reply Follow Share that is telling about C++ and reason being templates. C grammar should be context sensitive.. 2 votes 2 votes PEKKA commented Dec 5, 2016 reply Follow Share @Arjun SIR What about JAVA and Python ? How to answwer this kind of questions ? :( 2 votes 2 votes Please log in or register to add a comment.
–2 votes –2 votes ans b) Aditi Dan answered Dec 19, 2014 Aditi Dan comment Share Follow See 1 comment See all 1 1 comment reply Debapaul commented Jan 12, 2020 reply Follow Share Your answers are $WORST$ on GO 2 votes 2 votes Please log in or register to add a comment.