Pointer Program : Size of Pointer to Structure
Program :
1 2 3 4 5 6 7 8 9 10 11 12 13 | #include<stdio.h> typedef struct XYZ { int far *fptr; double dvar; unsigned char ch; } xyz; int main() { xyz *ptr = (XYZ *) 1000; printf("Size of Pointer to structure : %d", sizeof(ptr)); return (0); } |
Output :
1 | Size of Pointer to structure : 2 |