Wednesday 20 August 2014

What is the output of the following Program?




#include<stdio.h>
#include<conio.h>
void main( )
{
            char far *p1, *p2;
            printf("%d,%d",sizeof(p1),sizeof(p2));
}

Options:
A)4,2
B)2,2
C)4,4
D) an error





Answer Option A)

-->A Pointer size is 2 bytes (for 16-bit compiler)
-->The size of far pointer is 4 bytes
-->The size of the huge pointer is 4 bytes
-->the far pointer is 16-bit segment value
-->the huge pointr is 16-bit offset value






0 comments:

Post a Comment