Which one statement is true After the execution of the follo

Which one statement is true?

After the execution of the following program:

Dim i As Integer

Dim j As Integer = 2

i = 3 * (j \\ 3)

the value of the variable i is _____

a. 0

b. 1

c. 2

d. 3

e. 4

Solution

Answer: a. 0

Dim i As Integer

Dim j As Integer = 2

i = 3 * (j \\ 3)

In first line, i variable declared wth out any value initialiazation.

in second line, j variable declared with value 3

in third line,

(j \\ 3) will return 0 because j value is integer when w do divide with 3.2 / 3 will give result as 0. So 3 * (j/3) = 3 * 0 = 0

Finaaly i value will assigne with value 0.

Which one statement is true? After the execution of the following program: Dim i As Integer Dim j As Integer = 2 i = 3 * (j \\ 3) the value of the variable i is

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site