What will be the output of the following C# code?
static void Main(string[] args)
{
float a = 16.4f;
int b = 12;
float c;
c = a * ( b + a) / (a - b) ;
Console.WriteLine("result is :" +c);
Console.ReadLine();
}
static void Main(string[] args)
{
float a = 16.4f;
int b = 12;
float c;
c = a * ( b + a) / (a - b) ;
Console.WriteLine("result is :" +c);
Console.ReadLine();
}
A. 106
B. 104.789
C. 105.8546
D. 103.45
Answer: Option C
Related Questions on Operators and Expressions in C Sharp
What does the modulus operator (%) do in C#?
A. Increments the operand by 1
B. Returns the quotient of a division
C. Performs multiplication
D. Returns the remainder of a division
Join The Discussion