791 views

Consider the class of object oriented languages. Which of the following is true?

1. Pascal is an object oriented language.
2. Object oriented languages require heap management.
3. Object oriented languages cannot be implemented in language C.
4. Object oriented languages are more powerful than declarative programming languages.
5. Parallelism cannot be realized in object oriented languages.

1 comment

yes B is correct

ans is B .in programming language like java when object is  created it cannot reside on stack so it uses heap........
A is wrong because pascal is procedure oriented but object pascal is object oriented.
C is also wrong coz we can implement some oops concept through c.
d and e also wrong..........
by

Option A is incorrect, as Pascal is a procedure-oreinted language, just like our beloved C.

As per Wikipedia:

The literature on programming languages contains an abundance of informal claims about their relative expressive power, but there is no framework for formalizing such statements nor for deriving interesting consequences.

Also, no paradigm of langauges (procedure/object oriented, or declarative, or imperative) is more powerful than the other. It's just that some set of problems is relatively easier to do with some paradigm.

So, Option D is incorrect.

C isn't an object oriented langauge, but it is powerful enough to simulate other paradigms.

https://www.kristijorgji.com/blog/simulating-object-oriented-programming-oop-in-c/

So, Option C is incorrect.

I think parallelism is unrelated to the programming paradigm, and more dependent on the computer architecture.

Not too sure about my reasoning here, but I think Option E is incorrect.

For dynamic memory allocation, we require heap irrespective of the paradigm.

So, Option B is correct.