Hi...,
I just wanted to ask what are the posible scenarios where we could use function pointers in C... If anyone out there has any example then please do tell me....

Recommended Answers

All 7 Replies

Ya...
Thanks Duoas.... I will go through these tutorials...

Linux uses an array of function pointers for its system calls....Gerard

Every OS does that. When you link a DLL with your program one of the things that happens is there is a table of function pointers that gets initialized. Such things are essential in relocatable code.

Hi...,
I just wanted to ask what are the posible scenarios where we could use function pointers in C... If anyone out there has any example then please do tell me....

you can use pointers to functions in case of state machines. you can run a forloop and index through an array of function pointers based on met conditions.

I came across a new site " www.iocpl.com "
They had a free demo lecture on pointers in C.

>I came across a new site "<snipped link>"
You "came across" it, huh? :icon_rolleyes: In my experience, that's a lie. It's much more likely that you're somehow affiliated with the site and are trying to advertise it without looking like a spammer.

definitely. stay away from any site that wants you to pay for "lectures" on something as universal as C programming

you can find tons of high quality and freely available tutorials and lectures from credible institutions and individuals all over the internet, without resorting to some dubious "institute of computer programming" who wants to sell you what is already available for free.

they probably are just repackaging someone elses material and selling it.

interestingly, this Chandrashekhar1 person has 2 posts, both of which are plugging this site he "came across"

EDIT

OMFG. i just downloaded his "introductory" free lecture, a zip of html files.. It's pure and total crap. i feel like i just violated my poor computer by putting such ugly and error-ridden garbage on it. i need to do a system restore and go take a shower.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.