in Programming
2,414 views
0 votes
0 votes

Which of the following statements is true regarding C language?

  • S1: C is a functional language
  • S2: C is a declarative language
  • S3: C is a procedural language
  • S4: C is a structured language
  1. S1, S2 and S3 only
  2. S2 and S4 only
  3. S2, S3 and S4 only
  4. S1, S3 and S4 only
in Programming
by
2.4k views

7 Comments

moved by

C is purely functional and imperative language .

http://stackoverflow.com/questions/602444/what-is-functional-declarative-and-imperative-programming

Hence, option B is correct.

0
0
So, why option B, why not D ?
1
1
@vijaycs,

There is difference between purely functional and funtional .

Like C++ is object oriented and not purely object oriented .
0
0

yes , diff between purely object oriented and object oriented is okay,

But, please check this,

https://en.wikipedia.org/wiki/List_of_programming_languages_by_type#Functional_languages

 Many so-called functional languages are "impure", containing imperative features

1
1
I guess they have given so, because  C can be made functional explicitly but this feature is not by default in C. Like, LISP has implicit functional properties.
0
0
@Arjun sir, please check above wiki reference, sir .
0
0
C is procedured , structured language . not functional , declarative
0
0

3 Answers

1 vote
1 vote
by

4 Comments

C is not purely functional language as here we dont write program base on functional logic
3
3

@Arjun sir wiki page https://en.wikipedia.org/wiki/Functional_programming says that it is a declarative programming paradigm. So if C is functional then it should be declarative according to this. I am confused.

0
0

Here also C is not in the list of functional programming. More ever the related paradigm to functional programming is given as declarative.
https://en.wikipedia.org/wiki/Comparison_of_programming_paradigms#Main_paradigm_approaches

0
0
Well, it is ambiguous. As per current convention, no one will call C as a functional language. This will never be asked in GATE at least. Is a bad question for GATE.
4
4
0 votes
0 votes
i think the answer should be (d) s1,s3,s4.

because  c is completly functional and procedure language . And their is also a structure facility .
0 votes
0 votes
Answer:

Related questions