Trung Minh
New member
What is the output of the following code?
A. 2
B. Error due to too many inputs
C. 28
D. Error due to nargn
Code:
function c = addem(ap,q)
p=nargn-1
switch p
case 2
c = ap*q;
case 1
c = sin(q)
otherwise
c = 0;
end
addem(1,2,3,4,5,6,7,8)
B. Error due to too many inputs
C. 28
D. Error due to nargn