What does %ld mean in C language?
"%ld" in C language is a type in the format specifier, that is, the format output input symbol. Its function is to convert the input or output data according to the format specified by the format specifier. For input or output, this type represents data input or output as decimal signed long integer.
Other types
##Sample code
#include <stdio.h> int main(){ int i; long l; unsigned int u;//定义三个不同类型的变量。 scanf("%d%ld%u",&i,&l,&u);//格式化输入三种变量,每个对应自己的类型。 printf("i = %d\n", i); printf("l = %ld\n", l); printf("u = %u\n", u);//分行格式化输出三个变量的值。 return 0; } 如果输入1 2 3将输出 i = 1l = 2u = 3
C#"
The above is the detailed content of What does %ld mean in C language?. For more information, please follow other related articles on the PHP Chinese website!