What is the output of the following command? [code]function p= marie(p,q) narginchk[2,3] disp(‘Yo, G!’) a=p+q end marie(1)[/code]

Ngân Lam

New member
What is the output of the following command?
Code:
function p= marie(p,q)
narginchk[2,3]
disp(‘Yo, G!’)
a=p+q
end
marie(1)
A. Syntactical Error in narginchk
B.
Yo, G!
a=1
C. Input error in narginchk
D. 2 3 4 5…Inf
 
Answer: a
Explanation: There has been syntactical error while using the narginchk command in the marie function. The input to this keyword is given within a parenthesis. If the input was given within parentheses, the output would’ve been
Yo, G!
a=1
 

Tìm kiếm

Back
Top