adplus-dvertising
frame-decoration

Question

What is the output of the following code?
function mad= rush(p,varargin)
disp(p)
wish=cos(varargin{1})
end
p=rush(1:3,Inf)

a.

Error due to Inf

b.

-1

c.

p{1}= 1 2 3
wish=0

d.

p{1}= 1 2 3
wish=NaN

Posted under MATLAB

Answer: (d). p{1}= 1 2 3
wish=NaN

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.