I used type modifiers(far,near,huge) with normal variables rather than pointers and found that these pointer type modifiers are only applicable for the global normal variable but an error is generated when used with a variable local to a block.
int near a,far b,huge c;
int main()
{
int d,e,f;
printf("\n address of a=%u ,b=%u ,c=%u ,d=%u ,e=%u ,f=%u",&a,&b,&c,&d,&e,&f);
return 0;
}
why is this allowed with a global variable and not with a local variable. Additionally, what does the variable finally becomes i.e. it becomes a pointer,an integer with greater range or entirely something else.
Question already posted for over a year on
stackoverflow
What I have tried:
int near a,far b,huge c;
int main()
{
int d,e,f;
printf("\n address of a=%u ,b=%u ,c=%u ,d=%u ,e=%u ,f=%u",&a,&b,&c,&d,&e,&f);
return 0;
}