c - Use of type modifiers(near,far,huge) with normal variables -


i used type modifiers(far,near,huge) with normal variables rather pointers , found these pointer type modifiers applicable global normal variable error generated when used variable local block.

int near a,far b,huge c;  int main() {  int d,e,f;  // int near a,far b,,huge c; // long int near a,far b,huge c; // long long int near a,far b,huge c;  //printf("\n size of a=%d ,b=%d ,c=%d ,d=%d ,e=%d ,f=%d",sizeof(a),sizeof(b),sizeof(c),sizeof(d),sizeof(e),sizeof(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 allowed global variable , not local variable. additionally, variable becomes i.e. becomes pointer,an integer greater range or entirely else.

near, far, , huge affect where, , in type of memory, variable stored. since local variables stored on stack, using these modifiers on local variables doesn't make sense.

note these features unique 16-bit dos platform. not used on modern systems -- can safely ignore them.


Comments

Popular posts from this blog

javascript - Chart.js (Radar Chart) different scaleLineColor for each scaleLine -

apache - Error with PHP mail(): Multiple or malformed newlines found in additional_header -

java - Android – MapFragment overlay button shadow, just like MyLocation button -