1. Plastic (base) int basic integral type Long Long integer signed signed (can differentiate positive and negative) unsigned unsigned, negative number will be converted to positive (02) floating point Data flot single-precision floating point type, 6 digits after the decimal point (6 digits of valid digits) Dou BLE double-precision floating point, reserved for 15 bits (15 digits) (03) character data (used to denote real numbers with decimal points) Char character type (with single quotation mark ") for storing letters and punctuation (characters are stored in the computer with binary ASCLL code) printf (" Decimal%.3f\n,1.0 ") If you want to preserve n digits after the decimal point, Use%.NF If there is an integer in an expression, it is also an integer, and if it contains a floating-point type, the resulting result is a floating-point type, which means that the result of the expression depends on the highest level of data type it contains (Char->int->float- Double), which is called automatic type conversion (implicit type conversion) high-to-low when we want to convert from a low-level type to a high-level type, you need to use the coercion type conversion (display type conversion) (post-conversion type) (expression) int = (int) a;int sum= (int) (A + b);
Programming Basics c--Basic data types: