Correct Answer : B

Execution of program starts from `main`

. Inside `main`

, an integer variable called `n`

is declared and is initialized to `5`

. The next statement is a `while`

loop with condition `n > 0`

. As long as this condition is satisfied `while`

loop is executed.

Iteration 1: `n--`

decrements value of `n`

. So `n`

becomes 4 but this value is reflected for the next usage of `n`

. Then value of `n`

is printed using display statement.

Iteration 2: `n--`

decrements value of `n`

. So `n`

becomes 3 but this value is reflected for the next usage of `n`

. Then value of `n`

is printed using display statement.

Iteration 3: `n--`

decrements value of `n`

. So `n`

becomes 2 but this value is reflected for the next usage of `n`

. Then value of `n`

is printed using display statement.

Iteration 4: `n--`

decrements value of `n`

. So `n`

becomes 1 but this value is reflected for the next usage of `n`

. Then value of `n`

is printed using display statement.

Iteration 5: `n--`

decrements value of `n`

. So `n`

becomes 0 but this value is reflected for the next usage of `n`

. Then value of `n`

is printed using display statement.

Now as n became 0, the condition in `while`

returns `false`

. So `while`

loop terminates.