adplus-dvertising
frame-decoration

Question

What is the output of the following code?
function [die,af] = lola(y,x)
die = y*x;
if nargout < 1
    error('Boo !')
 else
   disp(‘Yo !’)
   af = abs(die);
end
end
p=lola(1,[1 -2])

a.

Error with Boo ! written

b.

Yo !
p=-2

c.

Boo !
p=-1

d.

Boo !
p=1

Posted under MATLAB Programming MATLAB

Answer: (a).Error with Boo ! written

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. What is the output of the following code?

Similar Questions

Discover Related MCQs

Q. A function ______________

Q. The narginchk command can limit the size of which cellular array?

Q. The nargoutchk command limits the length of which cellular array?

Q. How can we influence the disp command with format specifiers?

Q. Amongst multiple elseif and nested if, which would take less runtime?

Q. The end statement is given multiple times in _________

Q. What will happen if we don’t give an otherwise block to our switch structure?

Q. While developing a switch-case structure, the value for case can be _________

Q. Menu-driven architecture should be done by ________

Q. The program to check the highest of n numbers can be done by ________

Q. Giving conditions using characters, we give them using ____

Q. The if structure is a _________

Q. The switch-case structure is a _________

Q. The if-else structure does not allow ___________

Q. Before starting a new case, we have to end the previous case using ___________

Q. We cannot use a ____ statement in the standalone if-else structure.

Q. The continue statement can be used in a switch-case structure.

Q. We cannot use a ____ statement if the if-else structure is not part of a loop.

Q. If a logical expression is true, it will always return a logical 1 and if it’s false, it’ll always return a 0.

Q. The functioning of all() and any() is same.