Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and beauty - scanf("%ld ",& ampd); What does l stand for? How to write when using printf to output the specific format of written data?
scanf("%ld ",& ampd); What does l stand for? How to write when using printf to output the specific format of written data?
scanf("%ld ",& ampd); When inputting data, l in in represents data in the form of long int;

When using printf to output the specific format of written data: %d and %i are (decimal) int, %f is float (default six decimal places), %c is char (single character), %s is string, %o is (octal) int, %x and %X are (hexadecimal) int (case correspondence). %e and %E refer to decimals displayed in scientific notation (such as "65438+%5.2f/E+02"), L refers to long int, which can be added before d, o, x and u, "%5d" refers to an integer with 5 digits output (to the right), and -5d "refers to 5 on the left.

In TC, the length of int is the same as that of short int, but in VC, the length of int is the same as that of long int, so it is the same if it is VC.