Variable declared in a procedure have . . . . . . . . scope.

Class
Procedure
Block
Object

The correct answer is B. Procedure.

A variable declared in a procedure has procedure scope. This means that the variable can only be accessed within the procedure in which it is declared.

The other options are incorrect because:

  • A class is a blueprint for creating objects. Variables declared in a class have class scope, which means that they can be accessed from any method in the class.
  • A block is a group of statements that are executed together. Variables declared in a block have block scope, which means that they can only be accessed from within the block in which they are declared.
  • An object is an instance of a class. Variables declared in an object have object 24.9-48.3 48.6-11.4 42.9-11.4 132.3-11.4 132.3s0 89.4 11.4 132.3c6.3 23.7 24.8 41.5 48.3 47.8C117.2 448 288 448 288 448s170.8 0 213.4-11.5c23.5-6.3 42-24.2 48.3-47.8 11.4-42.9 11.4-132.3 11.4-132.3s0-89.4-11.4-132.3zm-317.5 213.5V175.2l142.7 81.2-142.7 81.2z"/> Subscribe on YouTube
scope, which means that they can only be accessed from within the object in which they are declared.
Exit mobile version