本文介绍了后缀"餐饮QUOT;在浮点值?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道的区别是在C这两个变量之间是什么:

I am wondering what the difference is between these two variables in C:

float price = 3.00;

float price = 3.00f;

结尾的F?

推荐答案

3.00 是间preTED为双击,而不是 3.00f 编译器为浮法这被视为

3.00 is interpreted as a double, as opposed to 3.00f which is seen by the compiler as a float.

˚F后缀只是告诉编译器这是一个浮动和这是一个

The f suffix simply tells the compiler which is a float and which is a double.

请参阅

这篇关于后缀"餐饮QUOT;在浮点值?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-11 07:58