Solve below snippet | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Solve below snippet

using System; public class Program { public static void Main(string[] args) { int val = (byte)+(char)-(int)+(long)-2; Console.WriteLine(val); } }

3rd May 2019, 4:49 PM
$@G@®️
$@G@®️ - avatar
1 Answer
0
well you are doing some castings and the result is "2". The code runs: https://code.sololearn.com/cVz7f526Id73/#cs
12th May 2019, 8:04 PM
Thomas Wittek
Thomas Wittek - avatar