Computer Science, asked by rk18n, 1 month ago

What will be the resultant type of the following expression if b represents a byte variable, I

represents an int variable, f represents float variable and d represents double variable?

b – i + (int) d / f – i * f + b

Do answer this with complete solution​

Answers

Answered by hariomlaheja01
1

Answer:

Solving According To BODMAS Rule

  • (int)d / f = float type

d is in double it will in greatest type

but it convert in int so greatest type is float  

  • after this the equation is = b - i + f - i * f + b
  • i * f = float type
  • after this the equation is = b - i + f - f + b
  • i + f = float type and f + b = float type
  • after this the equation is = b - f - f
  • b - f- f = float type
  • the answer is float type

so float is the resutant type.

Similar questions