Yes, you can call a function from within a switch statement in C.
switch (i) {
case 0: function1(i); break;
case 1: function2(i); break;
default: function3(i); break;
}
When the function returns, you will still be in the switch statement.
Chat with our AI personalities
No. C function argument are positional.
. please give me 3 or 4 differences.one difference is that user defined can be called anytime but not for switch There is no such thing as 'switch function'
since, the word 'void' in C programming language means that it does not return any value to the user or calling function....this is usually used to specify a type of function...... for this reason w use 'void'in c program..
Function declaration, definition, or calling? Pick one.
Calling an in-line function, which is not actually a function-call.