Multiple choice technology web technology

Page list’s or Value list’s index always starts with :

  1. 0

  2. 1

  3. ( )

  4. No subscript or braces.

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

In Pega, page lists and value lists use 1-based indexing, so the first element is at index 1 (not 0-based like some programming languages). They still use subscripts and braces like .Students(1) or .Values(1).

AI explanation

To answer this question, you need to understand how indexing works in programming.

Option A) 0 - This option is incorrect. In most programming languages, including popular ones like Python and Java, indexing starts from 0. This means that the first element in a list or array would have an index of 0, the second element would have an index of 1, and so on.

Option B) 1 - This option is correct. Although indexing typically starts from 0 in programming, there are some cases where indexing starts from 1. For example, in some spreadsheet software like Microsoft Excel, the indexing of rows and columns starts from 1.

Option C) ( ) - This option is incorrect. Parentheses are not used to indicate the starting index of a list or array. Instead, square brackets [] are commonly used for indexing.

Option D) No subscript or braces - This option is incorrect. In programming, it is common to use subscript or braces to indicate the starting index of a list or array.

The correct answer is B) 1. This option is correct because there are cases where indexing starts from 1, such as in some spreadsheet software. However, in most programming languages, indexing starts from 0.