Question
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
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 ______________
View solution
Q. The narginchk command can limit the size of which cellular array?
View solution
Q. The nargoutchk command limits the length of which cellular array?
View solution
Q. How can we influence the disp command with format specifiers?
View solution
Q. Amongst multiple elseif and nested if, which would take less runtime?
View solution
Q. The end statement is given multiple times in _________
View solution
Q. What will happen if we don’t give an otherwise block to our switch structure?
View solution
Q. While developing a switch-case structure, the value for case can be _________
View solution
Q. Menu-driven architecture should be done by ________
View solution
Q. The program to check the highest of n numbers can be done by ________
View solution
Q. Giving conditions using characters, we give them using ____
View solution
Q. The if structure is a _________
View solution
Q. The switch-case structure is a _________
View solution
Q. The if-else structure does not allow ___________
View solution
Q. Before starting a new case, we have to end the previous case using ___________
View solution
Q. We cannot use a ____ statement in the standalone if-else structure.
View solution
Q. The continue statement can be used in a switch-case structure.
View solution
Q. We cannot use a ____ statement if the if-else structure is not part of a loop.
View solution
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.
View solution
Q. The functioning of all() and any() is same.
View solution
Suggested Topics
Are you eager to expand your knowledge beyond MATLAB? We've curated a selection of related categories that you might find intriguing.
Click on the categories below to discover a wealth of MCQs and enrich your understanding of Computer Science. Happy exploring!