Considering the following scenario:
fn(1) calls fn(2) , then
fn(2) calls fn(3), and now
fn(3) should pass the control to fn(1) instead of fn(2) and control must not come back again.
Regarding this I have tried with goto, but goto does not work between functions, its only a local jump.
I wanted to check if there is any other method I could use to send the control to another function
NOTE: NO global variable, pointer to functions will work in this case, as per my exploration I would avoid jumps by all means. What is your use case? We might give better opportunities, if we know that.
以上就是exchange of control between functions in C language的详细内容，更多请关注web前端其它相关文章！