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
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
You must be logged in to post a comment.
c
Explanation: The two data type ‘float’ and ‘long’ after arithmetic operation completely converted to nearest whole number 23.
Output : 23