MCQ IN COMPUTER SCIENCE & ENGINEERING

COMPUTER SCIENCE AND ENGINEERING

COMPILER DESIGN

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
____ hold the data that is local to the execution of the procedure.
A
Global variable
B
Temporary variable
C
Local variable
D
Static variable
Explanation: 

Detailed explanation-1: -You can declare variables and constants in the declarative part of any PL/SQL block, subprogram, or package. Declarations allocate storage space for a value, specify its data type, and name the storage location so that you can reference it.

Detailed explanation-2: -The scope and lifetime of local variables are limited to the function or block in which they are declared. These variables are stored inside the activation record of functions, which are stored in the stack of memory assigned to the C program.

Detailed explanation-3: -A local variable is valid within the statement block in which it is defined and within any nested statement blocks, unless you redefine the variable within the statement block. In the beginning of the SPL procedure in the following figure, the integer variables x, y, and z are defined and initialized.

There is 1 question to complete.