COMPILER DESIGN

ADVANCED TOPICS IN COMPILER DESIGN

CODE GENERATION FOR OBJECT ORIENTED LANGUAGES

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
Programs with an explicit sequence of commands that update the program state, with or without procedure calls
A
Low-level
B
Declarative
C
Imperative
D
None
Explanation: 

Detailed explanation-1: -A procedural language follows a sequence of statements or commands in order to achieve a desired output. Each series of steps is called a procedure, and a program written in one of these languages will have one or more procedures within it. Common examples of procedural languages include: C and C++

Detailed explanation-2: -imperative language focus on how the program should follow its tasks, while the non-imperative, functional or logical language tells the program what it needs to do as opposed to how to do it.

Detailed explanation-3: -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.