My Report

MATLAB Practice Test 6


Correct Answer: 2 points | Wrong: -1 point
Grades: A* (100% score) | A (80%-99%) | B (60%-80%) | C (40%-60%) | D (0%-40%)
advertisement

1. What is the output of the following code?

if()
p=9;
end

2. What is the output of the following code?

t=[-2:1:2];plot(t,t);ax=gca;ax.Xscale=’Logarithmic’;

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

4. In nested loops, the continue statement exits the ____

5. What is the output of the following code?

function maha= orchid(polo,varargin)
disp(polo)
wish=sum(varargin{1,2})
end
p=rush(-1:1,Inf)

6. What will be the output of the following code?

~or(~xor(1,1),~or(0,1))

7. The number of iterations in the following loop is

p=3;for i=(3:4)
p=p+2;
end

8. In nested loops, the break statement exits the ____ loop.

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

10. What will be the output of the following code?

all([1 0])

 

Manish Bhojasia - Founder & CTO at Sanfoundry
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He lives in Bangalore, and focuses on development of Linux Kernel, SAN Technologies, Advanced C, Data Structures & Alogrithms. Stay connected with him at LinkedIn.

Subscribe to his free Masterclasses at Youtube & discussions at Telegram SanfoundryClasses.