224k views
4 votes
Assume that dotsize has an initial value of 10. If the code below were executed, what is the resulting value of dotsize? one answer

A. 9
B. 10
C. 11
D. 12
set global dotsize to (get global dotsize + 1)

1 Answer

3 votes

Final answer:

If the initial value of dotsize is 10, the code set global dotsize to (get global dotsize + 1) will increase dotsize's value by 1, making the final value 11.

Step-by-step explanation:

Assuming that dotsize starts with an initial value of 10, the provided code set global dotsize to (get global dotsize + 1) will increment the value of dotsize by 1. In programming, this operation is called incrementation. Therefore, the resulting value of dotsize after the code execution would be 11. Hence, the answer is C. 11.

Learn more about dotsize

User Afsar Ahamad
by
7.7k points

No related questions found