Q. 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) 23.453
  • (B) 22
  • (C) 23
  • (D) 22.453
πŸ’¬ Discuss
βœ… Correct Answer: (C) 23

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
342
Total Visits
πŸ“½οΈ
4 y ago
Published
πŸŽ–οΈ
Mr. Dubey
Publisher
πŸ“ˆ
82%
Success Rate