COMPILER DESIGN

ADVANCED TOPICS IN COMPILER DESIGN

CODE GENERATION FOR OBJECT ORIENTED LANGUAGES

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
Given below are the parts of a PL/SQL block:1. END;2. EXCEPTION3. DECLARE4. BEGINArrange the parts in order.
A
3, 4, 2, 1
B
3, 2, 4, 1
C
4, 3, 2, 1
D
2, 1, 4, 3
Explanation: 

Detailed explanation-1: -As Figure 1-1 shows, a PL/SQL block has three parts: a declarative part, an executable part, and an exception-handling part. (In PL/SQL, a warning or error condition is called an exception.) Only the executable part is required.

Detailed explanation-2: -Variable declarations (PL/SQL) Variables that are used in a block must generally be defined in the declaration section of the block unless they are global variables or package-level variables. A variable declaration consists of a name that is assigned to the variable and the data type of the variable.

Detailed explanation-3: -PL/SQL has three categories of control statements: conditional selection statements, loop statements and sequential control statements.

Detailed explanation-4: -In PL/SQL contexts, this statement can be compiled and executed by the data server. The anonymous block statement, which does not persist in the database, can consist of up to three sections: an optional declaration section, a mandatory executable section, and an optional exception section.

There is 1 question to complete.