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 209 views
1 answer 162 views
1 answer 158 views
2 answers 156 views
1 answer 164 views
164 views asked May 16, 2022 by avibootz
1 answer 265 views
...