adplus-dvertising
frame-decoration

Question

What will be the output of the following code?
switch num
case ‘a’
p=394;
case ‘b’
c=0;
end

a.

Error

b.

No output since we haven’t given num a value yet

c.

p=394

d.

c=0

Posted under MATLAB Programming MATLAB

Answer: (a).Error

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

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

Similar Questions

Discover Related MCQs

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.

Q. What does the function all() do?

Q. Choose the correct hierarchy of operations.

Q. The correct hierarchy of operations is ________

Q. ‘=’ is a?

Q. The ~ is ______

Q. All logical operators operate on at least two operands.

Q. The precedence of : operator is after | and before &.

Q. The precedence of Transpose operation is ____________

Q. All relational operators operate on _______________

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

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

Q. In nested loops, the break statement, if present within a nested if the structure, will exit the _______

Q. In nested loops, the continue statement, if present within an if structure, will exit the ____________

Q. In nested loops, the continue statement, if present within a nested if structure, will exit the ____________

Q. While running a loop in MATLAB, it does not require indentation.

Q. The effective working of the continue keyword in the final iteration is same as the effective working of the break keyword.

Q. The number of iterations run for any loop by MATLAB is always _____________

Q. The for loop performs at least ___ iteration/s.