what are the resultant data types if the following implicit type conversions are performed?Show the result with flow lines.int i;float f;double d;char c;byte b;(a)i+c/b;(b)f/d+c*f;(c)i+f-b*c;(d)(f/i)*c+s;(e)i+f-c+b/d;(f)i/c+f/b;
Answers
Answer:
a. int, char, double
b. float, double, char, float
c. int, float, byte, char
d. float, int, char, short
e. int, float, char, byte, double
f. int, char, float, byte
(a) int (b) double (c) float (d) float (e) double
Given:
int, float , double , char , byte are for the following options to get correct flowlines
To Find:
The variables which are given in fractions and to find their flowlines of them.
Solution:
Consider option (a),
= int +
= int + char
= int
Taking option (b),
+ c × f
= + char × float
= double + float
= double
Option (c),
i+f -b × c
= int + float - byte × char
= int + float - char
=float - char
= float
Option(d),
=
= int + float
= float
Option (e),
i + f- c+
= int + float -char +
= int + float - char +double
= float - char + double
= double
The answers for options a, b ,c, d, e is int , double , float , float, double
#SPJ3