huge pointer

(13)What is huge pointer ?
Ans :

Is is 32 bit pointer .Its is similar to far pointer but any arithmetic or relational operation is performed in huge address then first it is normalize.
What will be output:
void main()
int huge *a=(int huge *)0x59990005;
int huge *b=(int huge *)0x59980015;
printf("power of pointer");
printf("power of c");
Output: power of pointer

Explanation:Here we are performing relational operation between two huge address. So first both a and b will normalize.
a=(0x5999)* (0x10)+(0x0005)=0x9990+0x0005=0x9995
b=(0x5998)* (0x10)+(0x0015)=0x9980+0x0015=0x9995
Here both huge address is representing same physical address. So a==b is true.
Note. Two 32 bit address can be represent same physical address but two physical address must be unique.

No comments: