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 198 views
1 answer 153 views
1 answer 141 views
2 answers 143 views
1 answer 152 views
152 views asked May 16, 2022 by avibootz
1 answer 248 views
...