COMPILER DESIGN

ADVANCED TOPICS IN COMPILER DESIGN

CODE GENERATION FOR OBJECT ORIENTED LANGUAGES

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
Which lines of code will correctly display the message “Hello World”? (Choose two.)
A
DBMS ____ OUTPUT.PUT ____ LINE(’Hello’ || ‘World’);
B
DBMS ____ OUTPUT(’Hello World’);
C
DBMS ____ OUTPUT.PUT ____ LINE(’Hello World’);
D
DBMS ____ OUTPUT.PUT ____ LINE(’Hello’ || ‘ ‘ || ‘World’);
Explanation: 

Detailed explanation-1: -Here is the basic syntax of a SELECT statement: SELECT * FROM helloworld WHERE phrase = “Hello, World!"; This statement will fetch all columns (hence the * ) from the table helloworld, and filter the results only to the rows which the phrase column is equal to Hello, World! .

Detailed explanation-2: -The Oracle dbms output. put line procedure allows you to write data to flat file or to direct your PL/SQL output to a screen. Here is a code example using dbms output.

Detailed explanation-3: -The GOTO statement is a straightforward and basic flow of control statement that causes an unconditional change in the flow of control. It is used to branch to a specific user-defined location using labels defined in the SQL procedure.

Detailed explanation-4: -PL/SQL supports two comment styles: single-line and multi-line. Single-line comments begin with a double hyphen (–) anywhere on a line and extend to the end of the line. Multi-line comments begin with a slash-asterisk ( /* ), end with an asterisk-slash ( */ ), and can span multiple lines.

There is 1 question to complete.