Int a=100
Float b=7.68
Printf (" a=% d ", a);//here will output a, a is an integer value, so use % d;
Printf (" b=% f ", b);//here to output b, b is floating point, so use % f,
Chase, shicheng cc Chen Lichen, founder of the science and technology
CodePudding user response:
Good, ask yourself the answer ah,,,CodePudding user response:
Is this advertisement? Are binary data in the memory, using % d output is a value, use % f output is a value, although not the same, but the memory of the binary constant, because the floating-point and integer representation methods, namely, for the same binary number, the different symbols, such as and % f, % d its analytical method is different, so the result is not the same,