What are the resultant data types if the following implicit conversions are performed?
Show the result with flow lines. [1 *2 = 2 marks]
int i; float f; double d; char c; byte b;
i. i + f - b*c;
ii. i + f- c + b/d;
Answers
Answered by
1
i] i + f - b*c;
i + f - b*c;
⇒ int + float - byte * char
⇒ int + float - char
⇒ float - char
⇒ float
ii] 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
Add brinlist please Sister
Similar questions