用float就出现warning,换成double就没事,该怎么解决

用float就出现warning,换成double就没事
刚才练习使用指针,写了段测试代码
#include<stdio.h>
#include<conio.h>

int main(void)
{
char* p="%d%c%f%c%lf\n%s\n";

int i=3;
float f=2.3;
float lf=i+f;
char c1='+',c2='=',*c3="You can do it again with more tests";

printf(p,i,c1,f,c2,lf,c3);

getch();

return (0);
}

按ctrl+F7 Compile 结果一个warning
用float就出现warning,换成double就没事,该怎么解决

把float f=2.3; float lf=i+f; 换成 double f=2.3;double lf=i+f;结果warning就没了。
PS:用float f=2.3;float lf=i+f; 虽然有warning,但可以正常执行。

哪位大虾可以帮我分析一下原因呢?
------解决方案--------------------
2.3这个常数对编译器来说是作为double的
------解决方案--------------------
float f=2.3f;
------解决方案--------------------
编译器认为把一个double赋值给float损失了精度
------解决方案--------------------
浮点数 默认的是  double的, 如2.3.
若想指定为 float,请加后缀 f 或F,如  2.3f