Multiple choice technology testing

Constant is declared using :

  1. Dim statement

  2. Option Explicit statement

  3. Con Statement

  4. Const Statement

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

In VBScript (used in QTP/UFT and classic ASP), constants are declared using the Const statement, not Dim (which is for variables), Option Explicit (which forces variable declaration), or Con (which is not a valid statement). The Const statement creates a named value that cannot be changed during script execution, which is essential for maintaining code readability and preventing accidental modification of fixed values.