Hello,
I recently stumbled upon this page. And I was particularly interested about the section which dealt with Direct Parameter Access.
I was just wondering if there is any way to execute just one of the functions depending on the value of n in the following line:
printf("%n$p", func1, func2, func3 .. funcN);
where func1,.. have signature as int func1(), int func2(), and so on.. This is a restriction as I might want to have function tha return void too.
In the above line, only the address of the function is printed; The function is not called..
I even tried using the ',' (comma operator) to achieve this; but in that case, all the functions in the list will get call, and the result corresponding to the 'n' is printed.
Is there any way to actually execute the function inside printf(..)?
Thanks.