COMPUTER FUNDAMENTALS

COMPUTER SOFTWARE

PROGRAMMING LANGUAGES

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
Which paradigm dictates WHAT should be done but not HOW it should be done?
A
Declarative
B
Imperative
C
Functional
D
OOP
Explanation: 

Detailed explanation-1: -They are the opposite of declarative paradigms, these focus on WHAT the program should accomplish without specifying HOW the program should achieve that result.

Detailed explanation-2: -Declarative programming is a programming paradigm in which the programmer defines what needs to be accomplished by the program without defining how it needs to be implemented. In other words, the approach focuses on what needs to be achieved instead of instructing how to achieve it.

Detailed explanation-3: -Declarative programming is a paradigm describing WHAT the program does, without explicitly specifying its control flow. Imperative programming is a paradigm describing HOW the program should do something by explicitly specifying each instruction (or statement) step by step, which mutate the program’s state.

Detailed explanation-4: -The Logical Paradigm takes a declarative approach to problem-solving. Various logical assertions about a situation are made, establishing all known facts.

Detailed explanation-5: -The easiest way to explain the difference between declarative and imperative code, would be that imperative code focuses on writing an explicit sequence of commands to describe how you want the computer to do things, and declarative code focuses on specifying the result of what you want.

There is 1 question to complete.