when i compile this program
main()
{
struct emp
{
char name[20];
float sal;
};
struct emp e[10];
int i;
for(i=0; i<=9; i++)
scanf("%s %f", e[i].name, &e[i].sal);
}
it gives the Floating point formats not linked
but when i run this
main()
{
float x;
scanf("%f" , x);
}
<< moderator edit: fixed [co[u][/u]de][/co[u][/u]de]
tags >>
it gives no error
i got the explanation of first question as
compiler encounters a reference to the address of a float so this is error
in the second program we are also passing the address of x
thn why not error
is i missing something that is not clear to me
plz explain what is going on in both the program