S
sreelal
Dear friends,
Please consider the following C program.
#include<stdio.h>
struct employee
{
int id;
float sal;
};
main()
{
struct employee emp[5];
int i=1;
scanf("%f",&emp.sal);
return 0;
}
When I run the follwoing C program on TurboC++ Version 3.0 on Windows
it shows the error,
scanf: floating point format not linked.
Abnormal program termination
Please tell me why this happens.
The same code shows no error when I replace the variable 'i' in the scanf statment
with an interger, like
scanf("%f",&emp[1].sal);
Please tell me what is wrong with the code.
Lal
Please consider the following C program.
#include<stdio.h>
struct employee
{
int id;
float sal;
};
main()
{
struct employee emp[5];
int i=1;
scanf("%f",&emp.sal);
return 0;
}
When I run the follwoing C program on TurboC++ Version 3.0 on Windows
it shows the error,
scanf: floating point format not linked.
Abnormal program termination
Please tell me why this happens.
The same code shows no error when I replace the variable 'i' in the scanf statment
with an interger, like
scanf("%f",&emp[1].sal);
Please tell me what is wrong with the code.
Lal