> In classic C or C++, you would define a function taking optional arguments as :
Is that true? Can classic C have default (optional) arguments?
Is that true? Can classic C have default (optional) arguments?
void fun(int mandatory_arg, int optional_arg1 = 1, int optional_arg2 = 12, int optional_arg3 = 12);
No, this isn't legal ISO C. There are ways to simulate them though: https://gustedt.wordpress.com/2010/06/03/default-arguments-f...