Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and beauty - What are the input and output formats of long int in C language?
What are the input and output formats of long int in C language?
There is a type in C language that is the same as the long long type, which is int64, and the format it uses is %I64d. If it is a long long, the format is %lld.

1. Using %lld format to output long is an extension of C99 standard to integer type. Each variable takes 8 bytes, 64 bits, representing the long long 9223372036854775808 ~ 92237203685475807.

2. When outputting ong type, you need to use the printf function to output the sample code longlonga =1234 in %lld format; printf("a=%lld\n ",a).

3. Various output formats that can be used for %d can be used for %lld, for example,% 10lld, which means that the output occupies ten bits in width.