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 ...
|
|||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
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?
|
|
|||
|
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'); |
![]() |
| Thread Tools | |
|
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| comp.lang.c Answers (Abridged) to Frequently Asked Questions (FAQ) | Steve Summit | Tech FAQ | 0 | 06-15-2004 07:00 AM |
| comp.lang.c Answers (Abridged) to Frequently Asked Questions (FAQ) | Steve Summit | Tech FAQ | 0 | 06-01-2004 07:01 AM |
| comp.lang.c FAQ list Table of Contents | Steve Summit | Tech FAQ | 0 | 06-01-2004 07:00 AM |
| comp.lang.c Answers to Frequently Asked Questions (FAQ List) | Steve Summit | Tech FAQ | 0 | 06-01-2004 07:00 AM |
| comp.lang.c Answers (Abridged) to Frequently Asked Questions (FAQ) | Steve Summit | Tech FAQ | 0 | 05-15-2004 07:00 AM |