137k views
4 votes
7) What is the value of a after the expression is evaluated?What will the program display?a3b15abDISPLAY (a)

7) What is the value of a after the expression is evaluated?What will the program-example-1

1 Answer

4 votes

Hello!

As we have the command DISPLAY (a) in the end, and a ← 3, it means that the variable a will receive the value 3.

After that, we have another attribution:

b ← 15, that means b will receive the value 15.

So, at this moment we have these values:

a = 3

b = 15

But now we have the last attribution:

the variable a will receive the value contained in b, expressed by a ← b, so the first value of a will be superscript by the value of b, resulting in:

a = 15

b = 15

So, the program will display the value of a, 15.

User CalculatingKraken
by
8.0k points

No related questions found

Welcome to QAmmunity.org, where you can ask questions and receive answers from other members of our community.