Multiple choice technology programming languages

What is the output of the messagebox function in following code Class Test Dim A, B, C as Byte, Sub Main() A=200 B=100 C=A+B Console.WriteLine ( C ) End sub End Class

  1. Prints 300 as the output

  2. Prints “C”

  3. Compiler Error

  4. RunTime Error

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

Byte variables in VB.NET have a range of 0-255. When A=200 and B=100 are added, the result is 300, which exceeds the maximum value a Byte can hold. This causes an overflow exception at runtime, not during compilation.