title: How can I pass arguments to the function pointer in following code?
body: <p>I tried those code but there is some issue with scope of parameters a and  b. please someone help me out here. </p>
  
  <pre><code>#include&lt;conio.h&gt;
  #include&lt;stdio.h&gt;
  int add(int x, int y) {
      return (x + y);
  }
  void passptr(int( * fp)(int a, int b)) {
      int result = ( * fp)(a, b);
      printf("%d", result);
  }
  int main() {
      add(3, 5);
      passptr( &amp; add);
      getch();
      return 0;
  }
  </code></pre>