Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: Notesfiles $Revision: 1.7.0.10 $; site ndm20 Path: utzoo!linus!decvax!bellcore!ulysses!mhuxr!mhuxt!houxm!ihnp4!inuxc!pur-ee!uiucdcs!convex!ndm20!lvs From: lvs@ndm20 Newsgroups: net.lang.c Subject: Re: address of function Message-ID: <3400018@ndm20> Date: Mon, 17-Mar-86 11:41:00 EST Article-I.D.: ndm20.3400018 Posted: Mon Mar 17 11:41:00 1986 Date-Received: Sun, 30-Mar-86 05:02:55 EST References: <2287@amd.UUCP> Lines: 24 Nf-ID: #R:amd.UUCP:2287:ndm20:3400018:000:821 Nf-From: ndm20!lvs Mar 17 10:41:00 1986 >I am a programmer who has just learnt C and has started using it >to do my programming. I have a question for which I was unable to >get the answer. I would like to know how to find the address of a >function in C. I would appreciate any help in this regard from netlanders. >Thanking all the respondents(C experts). As defined in K&R, the address of a function may be obtained by referencing the name of the function without the parens '()', see below. int func(); addr_of_func = func; This is similar to the fact that the name of an array is it's base address. Hope this helps. Larry V. Streepy Jr. "Waiting is" Nathan D. Maier Consulting Engineers VOICE: (214)739-4741 Usenet: ...!{allegra|ihnp4}!convex!smu!ndm20!lvs CSNET: ndm20!lvs@smu ARPA: ndm20!lvs%smu@csnet-relay.ARPA