#include <stdio.h>
#include <stdlib.h>
int main()
{
float a = 0.0f;
double b = 0;
long double c = 0.01;
scanf_s("%f%lf%Lf", &a, &b, &c);
printf("float:%f,double:%lf,long double:%Lf", a, b, c);
//以下为错误书写,由于输入lf而存储进a为f的存储空间而溢出
//scanf_s("lf",&a&b&c);
//float类型用%lf输入会溢出,导致出现stack around the variable "a" was corrupted错误return 0;
}
stack around the variable “a“ was corrupted
最新推荐文章于 2024-09-27 19:15:27 发布