
- Forum
- Programming Talk
- C and C++
- How to Call Function by this Concept
How to Call Function by this Concept
This is a discussion on How to Call Function by this Concept within the C and C++ forums, part of the Programming Talk category; I have learnt the concept of functions and pointers in C.I want to know whether it is possible to combine ...
-
How to Call Function by this Concept
I have learnt the concept of functions and pointers in C.I want to know whether it is possible to combine these concepts and call a function via pointers in C programming language. If so how can I do this?
-
In C you call a function using a function pointer by explicitly dereferencing it using the * operator. Alternatively you may also just use the function pointers instead of the function’s name.
-
Yes as suggested by sammy you can use the concept of function pointers for calling a function using pointers in C programming language. I have given below a example to depict this usage.
int test1 = exforsys (10, 'c', 'x');
int test2 = (*exforsys) (10, 'c', 'x');
-
Sponsored Ads

Reply With Quote





