MATLAB Programming set 2

Que.What is the output of the following 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)

a. 2
b. Error due to too many inputs
c. 28
d. Error due to nargn
Que.What is the output of the following command?
function pu= hu(p,varargin)
    narginchk(0,1)
    disp(‘Stick!’)
    o=sin(varargin{1});
    end
    ola(1,p/2)

a. Error due to line 2
b. Error due to line 5
c. Error due to syntax
d. Stick!o=1
Que.The narginchk command can limit the size of which cellular array?
a. fun
b. rand(2)
c. eye(3)
d. varargin
Que.The nargoutchk command limits the length of which cellular array?
a. varargout
b. i(2)
c. random(69)
d. laplace(s)
Que.The following operation results in?
narginchk(2,Inf)

a. Error due to Inf
b. Limits the length of nargin from 2 to Inf
c. Logical Error
d. Limits the length of varargin from 1 to Inf
Que.The following operation result in
Function p= ol(q,varargin)
    narginchk(45,Inf)

a. Error due to Inf
b. The range of the varargin array becomes (44,Inf)
c. The range of the varargin array becomes (45,Inf)
d. The range of the varargin array becomes [45,Inf]
Que.The following operation results in
Function p= ol(q,varargin)
    narginchk(45,NaN)
    end

a. Error due to NaN
b. Syntactical error
c. Logical Error
d. Nothing happens
Que.What is the minimum number of arguments after the following operation occurs in any function?
narginchk(-2,0)

a. 0
b. 1
c. -2
d. Error
Que.What is the output of the following code?
P=disp(234)

a. Error
b. P=234
c. 234
d. P=234
Que.How can we influence the disp command with format specifiers?
a. Not possible
b. Via the sprintf() command
c. Use format specifiers as string input
d. Give format specifiers as input only