I don't know exactly why I use %lf when I input real numbers in the scanf function.

Asked 2 years ago, Updated 2 years ago, 83 views

I heard that if you receive a real data value from the scanf function, the data type of the factor value is automatically changed from float type to double type, so in that way, the int type data value will not change to long type but remain int type?

scanf pointer float double

2022-09-22 19:36

1 Answers

Since scanf receives a pointer with a factor, promotion does not occur


2022-09-22 19:36

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.