Passing a function as a parameter to another function in C
Was pleasantly surprised you can do that in C
float function1(float(*function2)(float parameter1))
{
float answer = function2(1.0);
return answer;
}
Which tells me there is still a lot to learn
Written by Alexander Zats
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#C
Authors
Related Tags
#c
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#