173k views
5 votes
It is possible to write programs in a purely functional subset of an imperative language such as C, but certain limitations of the language quickly become apparent. What features would need to be added to your favorite imperative language to make it genuinely useful as a functional language

User TCN
by
5.1k points

1 Answer

3 votes

Answer:

See explaination

Step-by-step explanation:

C Program lacks :

a. C programming language does not support object oriented features like Polymorphism,inheritance,encapsulation etc.

b. C is a procedure language so if we implement any algorithm we are required to use a set of function calls.

c. C doesn't support namespace like C++. If there is no namespace we can't declare two variables with same name.

d. It doesn't support destructor and constructors.

e. It doesn't provide the data security.

f. It doesn't provide reusability of source code.

g. It can't provide solutions for real world problems.

h. It provides low level of abstraction.

User Tony Babarino
by
5.1k points