Untitled

Anonymous
c_cpp
12/02/2024 5:32 PM
348 B
11
Indexable
// create a function pointer, and initialise
// it to the sin function
float (*trigfunction)(float value)=&sin;
float res1=trigfunction(1.1f);
// reassign the trigfunction function pointer to
// the cos function
trigfunction=&cos;
float res2=trigfunction(1.1f);
Editor is loading...
Leave a Comment