← Back to Course

Lesson 5: Overflow Due to Multiplication

Practice Questions

Question 1: Let z = x * y. All of the variables are of type uint16. Let x = 25520. What is the maximum value y can hold?

Question 2: Let z = x * y. All of the variables are of type uint16. Let x = 10. What is the maximum value y can hold?

Question 3: Let z = x * y. All of the variables are of type uint40. Let x = 123067123. What is the maximum value y can hold?

Question 4: Let z = x * y. All of the variables are of type uint128. Let x = 10¹⁸ (10**18) What is the maximum value y can hold?

Question 5: Let z = x * y. All of the variables are of type uint32. Let x = 100. What is the maximum value y can hold?