Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and medical aesthetics - What does it mean to see printf("%4.4ld ",a[i]) and %4.4ld in a program?
What does it mean to see printf("%4.4ld ",a[i]) and %4.4ld in a program?
4 means that the width of the entire output occupies four positions,

.4 means to take four decimal places, which is meaningless here. I will analyze it later.

Ld refers to the output in long shaping format, that is, the output in long int format.

Assuming that the type of a[i] is int or long int, then .4 is useless.

Assuming that the type of a[i] is double or float, then .4 is meaningless because the output format is wrong and the whole result is wrong.