KwickClips Course Topics · 45 sec · free
Why does b = b + 5 fail?
Short answer. b + 5 is an int, which cannot go into a byte without a cast.
What is b after b += 5 with b = 10?
15.
Remember
| = stores the right side |
| += operates, then stores |
| += has a hidden cast |
Plus equals works here. Plain equals fails. Why? B plus five becomes an int. An int cannot go into a byte without a cast. Plus equals casts back silently. Remember this. Equals stores. Plus equals operates and stores. It also casts.
This clip is from the full lesson: Assignment operations — 6 minutes, with the tables, the quick answers and the whole lesson in text.
Useful for: ISC Class 12 Computer Science (868)
Voice-over is AI-generated; the script is written and checked by Kajal Ma'am. Confirm anything you plan around against your official board document. We never ask for a password or an OTP.

