Computer Science, asked by Jungkookieluv, 2 days ago

9. Identify the type conversion is shown in the following snippet? Give reason double x = 543.87; int y = (int) x;​

Answers

Answered by velox
0

Answer:

Double to Integer

Explanation:

We have,

double x = 543.87    → x is a double variable.

int y = (int)x;    

→ (int)x indicates that x becomes an integer variable temporarily.

Which is again stored in y which is also an integer variable.

The final answer will be 543 which is an integer.

           

Attachments:
Similar questions