5,254 views
1 1 vote

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

4 Answers

1 1 vote
0 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 0 votes

I know many people are confused saying is C a functional Programming language or not.
But listen let's start with simple yet famous question, "Is C Declarative or Imperative/Procedural .?"
( Declarative means u simply declare "what to do?", but u don't explain how to do it, While Imperative/ Procedural means u explain "how to do it.?" )
So yeah "C is a Imperative/Procedural Language".
Now check the options -> 

  1. S1, S2 and S3 only
  2. S2 and S4 only
  3. S2, S3 and S4 only
  4. S1, S3 and S4 only
Only option 'D' Don't have 'S2' in it. So u can even ignore other checks, saving your time.
And Correct Ans. comes to be 'D'.
Answer:
Position:
Show:

Related questions

6 6 votes
1 1 answer
3.2k
3.2k views
Arjun asked Oct 18, 2016
3,226 views
Consider the following incomplete C function for reversing a singly linked list.node* reverse(node* trav){ if(trav->next) __________________ else { head - next = null; he...
5 5 votes
2 answers 2 answers
2.2k
2.2k views
Arjun asked Oct 18, 2016
2,207 views
What will be the output of the following code?#include <stdio.h #include <string.h int main() { struct mystruct{ char *name; unsigned int age; }; struct mystruct st1 = {"...
9 9 votes
2 answers 2 answers
2.3k
2.3k views
Arjun asked Oct 18, 2016
2,348 views
int foo(int n) { if(n 10000) return 1; int sum = 0, i; for( i = 0; i < n; i++) { sum += i; } return sum; }The value returned by the above function is$\Theta\left(n^2\rig...
3 3 votes
4 answers 4 answers
1.6k
1.6k views
Arjun asked Oct 18, 2016
1,595 views
What will be the output of the following code?#include <stdio.h int main() { char a = 'A', z = 'Z'; printf("%d", z-a); }