current position:Home>Why is it double? don't get it

Why is it double? don't get it

2022-02-03 00:01:35 CSDN Q & A

If you have any char w; int x; float y; double z; Expression w*x+z-y The data type of the value is ( )

Refer to the answer 1:

The system has default conversion rules , That is, from low precision to high precision , Avoid the loss of accuracy in calculation
The specific conversion rules are as follows
char --> short --> int ---> unsigned --> long --> unsigned long --> float --> double

Refer to the answer 2:

copyright notice
author[CSDN Q & A],Please bring the original link to reprint, thank you.

Random recommended