Question: Consider the following function: function ret = func 3 ( n ) ret = = ; switch n case 1 ret = 1 0 ;

Consider the following function:
function ret = func3(n)
ret == ;
switch n
case 1
ret =10;
case 2
ret =20;
end
end
What is the return value of func3(0)?
Error because there is no case for n==0.
20
0
10
Consider the following function: function ret =

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!