How to use pointer to function with empty parameters in C

1 Answer

0 votes
#include <stdio.h>

int f() {
    printf("C Programming");
}

  
int main() 
{ 
  int (*fp)() = f;
  
  fp();
  
  return 0; 
}



/*
run:

C Programming

*/

 



answered Apr 6, 2019 by avibootz

Related questions

2 answers 206 views
1 answer 160 views
1 answer 150 views
2 answers 152 views
1 answer 159 views
159 views asked May 16, 2022 by avibootz
1 answer 260 views
...