Page 1 of 1

Correct way to assign values to variable ‘c’ when int a=12, float b=3.5, int c;

Posted: Wed Jul 13, 2022 7:56 pm
by answerhappygod
a) c = a + b;
b) c = a + int(float(b));
c) c = a + convert.ToInt32(b);
d) c = int(a + b);