M Mỹ Duyên New member Sep 18, 2021 #1 What will be the output of the following C# code? Code: static void Main(string[] args) { float a = 10.553f; long b = 12L; int c; c = Convert.ToInt32(a + b); Console.WriteLine(c); } A. Code: 23 .453 B. 22 C. Code: 23 D. 22.453
What will be the output of the following C# code? Code: static void Main(string[] args) { float a = 10.553f; long b = 12L; int c; c = Convert.ToInt32(a + b); Console.WriteLine(c); } A. Code: 23 .453 B. 22 C. Code: 23 D. 22.453
N Ngô Trường Vủ New member Sep 18, 2021 #2 Answer: c Explanation: The two data type ‘float’ and ‘long’ after arithmetic operation completely converted to nearest whole number Code: 23 . Output : Code: 23 Upvote 0 Downvote
Answer: c Explanation: The two data type ‘float’ and ‘long’ after arithmetic operation completely converted to nearest whole number Code: 23 . Output : Code: 23