C Codes
Beginners
C on Unix
Code Snippets
Data Structures
File Operations
Games Graphics
Gnu-Linux
Hardware
Mathematics
Miscellaneous
Small Programs
Sorting
C > Hardware Interaction Through C sample source codes
Function Address Founder and Tester
Function Address Founder and Tester #include<dos.h> void my(); void (*my_address)(); void my() { printf(" WWW"); } void main() { char far *p; unsigned seg,off; my_address=my; clrscr(); /*****Calling function with the address of my function***/ (*my_address)(); printf(" Address of my=%u",my_address); printf(" Segment Address=%x",FP_SEG(my_address)); printf(" Offset Address=%x",FP_OFF(my_address)); printf(" Getting address by using segment and offset address"); printf(" Address of my=%u",MK_FP(FP_SEG(my_address),FP_OFF(my_address))); getch(); }
Privacy Policy
|
Link to Us
|
Links