Computer Science, asked by huzaifakayamkhani007, 1 day ago

What are the resultant data types, if the following implicit [2] conversions are performed? Show the result with flow lines. float f; double d; char ch; byte b; i) ‘a’ – 3; ​

Answers

Answered by ImperialRkSahu
0

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 + b;

(e) i + f- c + b/d;

(f) i/c + f/b;

Values & Data Types Java

ICSE

59 Likes

ANSWER

(a) i + c/b;

i + c/b;

⇒ int + char / byte

⇒ int + char

⇒ int

(b) f/d + c*f;

f/d + c*f;

⇒ float / double + char * float

⇒ double + float

⇒ double

(c) i + f - b*c;

i + f - b*c;

⇒ int + float - byte * char

⇒ int + float - char

⇒ float - char

⇒ float

(d) (f/i)*c + b;

(f/i)*c + b;

⇒ (float / int) * char + byte

⇒ float * char + byte

⇒ float + byte

⇒ float

(e) i + f- c + b/d;

i + f- c + b/d;

⇒ int + float - char + byte / double

⇒ int + float - char + double

⇒ float - char + double

⇒ float + double

⇒ double

(f) i/c + f/b;

i/c + f/b

⇒ int / char + float / byte

⇒ int + float

⇒ float

Answered by lovelykhushi6607
0

Answer:

(a) i + c/b;

     i + c/b;

⇒ int + char / byte

⇒ int + char

⇒ int

(b) f/d + c*f;

     f/d + c*f;

⇒ float / double + char * float

⇒ double + float

⇒ double

(c) i + f - b*c;

     i + f - b*c;

⇒ int + float - byte * char

⇒ int + float - char

⇒ float - char

⇒ float

(d) (f/i)*c + b;

     (f/i)*c + b;

⇒ (float / int) * char + byte

⇒ float * char + byte

⇒ float + byte

⇒ float

(e) i + f- c + b/d;

     i + f- c + b/d;

⇒ int + float - char + byte / double

⇒ int + float - char + double

⇒ float - char + double

⇒ float + double

⇒ double

(f) i/c + f/b;

     i/c + f/b

⇒ int / char + float / byte

⇒ int + float

⇒ float

Explanation:

MARK ME AS BRAINLIST PLEASE.

Similar questions