Que.MEX files work on JAVA.
|
a. True |
b. False |
c. May be True or False |
d. Can’t say |
Que.What is the default increment value in a for-loop?
|
a. 0 |
b. 1 |
c. An increment value is necessary |
d. 0/1 |
Que.What is the output of the following code?for i=1:4
for j=1:4
a=5;a=a+5;
end
end
|
a. No output will be shown |
b. a=10; |
c. a=80 |
d. Error in the code |
Que.What is the output of the following code?for i=1:5
for j=1:6
a(i,j)=input();
end
end
|
a. No output |
b. Error |
c. Asks user to input a 5*6 matrix |
d. Asks and displays a 5*6 matrix |
Que.What is the size of i after the following code is run in MATLAB?for i=5:1
i=i-2;
end
|
a. No output |
b. 0*0 |
c. i=-1 |
d. Error |
Que.A break statement will leave the outer loop.
|
a. True |
b. False |
c. May be True or False |
d. Can’t say |
Que.How many times will the following loop run?for i=1:5
if(i<3) break
|
a. No output due to some error |
b. 1 times |
c. 0 times |
d. 3 times |
Que.What is the nature of the following code?j=0;i=1;
while(j>5)
for i=1:8
j=j+i;
end
end
|
a. j=0 & i=1 |
b. j=1 & i=0 |
c. i=8 & j=36 |
d. Error |
Que.A for-loop can have multiple index values.
|
a. True |
b. False |
c. May be True or False |
d. Can't say |
Que.There can be multiple decision variables for while loop.
|
a. True |
b. False |
c. May be True or False |
d. Can't say |
Que.What will be the output for the following code?k=0;i=0;
while(k<1 && i<1)
k=k+1;
i=i+1;i=i-k;
end
|
a. i=0,k=1 |
b. i=0,k=0 |
c. i=1,k=0 |
d. i=1,k=1 |