Home>Article>Backend Development> What does %lf mean in c language?

What does %lf mean in c language?

藏色散人
藏色散人 Original
2020-04-16 09:53:39 61501browse

What does %lf mean in c language?

What does %lf mean in c language?

%lf represents the format character of double in C language and is used to format input and output.

double is a double-precision floating point type, occupying 8 bytes of space.

Defining a double variable can be written as:

double a;

The input statement can be written as:

scanf("%lf", &a);

The output statement can be written as:

printf("%lf",a);

The printf and scanf here , is the usage of %lf.

Recommended tutorial: "c Language Tutorial"

The above is the detailed content of What does %lf mean in c language?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn