title: Printing Function Address
body: <p>I've been trying a way to figure out how to print the address of the function, This is what I came up with </p>
  
  <pre><code>#include&lt;stdio.h&gt;
  int test(int a, int b)
  {
       return a+b;
  }
  int main(void)
  {
       int (*ptr)(int,int);
       ptr=&amp;test;
       printf("The address of the function is =%p\n",ptr);
       printf("The address of the function pointer is =%p\n",&amp;ptr);
       return 0;
  }
  </code></pre>
  
  <p>It o/p something like this without any warning and errors</p>
  
  <pre><code>address of function is =0x4006fa
  address of function pointer  is =0x7fffae4f73d8
  </code></pre>
  
  <p>My question whether using <strong>%p</strong> format specifier  is the correct way to print the address of the function or is there any other way to do so?</p>