# Logical Expressions – 2 MCQ’s

This set of MATLAB Multiple Choice Questions & Answers (MCQs) focuses on “Logical Expressions – 2″.

1. What is the output of the following code?

sin(pi)~=0

a) NaN

b) 0

c) 1

d) Error

2. What is the output of the following code?

sin(Inf)~=NaN

3. ‘=’ is a?

a) Relational operator

b) Arithmetic operator

c) Operational operator

d) Assignment operator

4. What is the output of the following code?

and(sin(pi),112312)

a) 1

b) 0

c) 00

d) Error

5. What is the output of the following code?

log(0)==Inf

a) 1

b) 0

c) Error

d) Inf

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

a) True

b) False

7. The ~ is ______

a) Quaternary operator

b) Relational Operator

c) Arithmetic Operator

d) Unary Operator

8. What is the output of the following code?

NaN==Inf

a) 0

b) 1

c) Nan

d) Inf

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

a) True

b) False

10. What is the output of the following code?

~xor(and(1,0),~xor(and(1,0),0))

a) 0

b) 1

c) NaN

d) Error

11. What is the output of the following code?

Sin(Inf)==NaN

a) 0

b) 1

c) Nan

d) Inf

12. The precedence of Transpose operation is ____________

a) after &

b) after |

c) before .^

d) after ^

13. All relational operators operate on _______________

a) only real part of complex numbers

b) only imaginary part of complex numbers

c) complex numbers

d) numbers which are not complex

14. What is the output of the following code?

all[1, 2, 3, NaN]

a) Error due to NaN

b) 1

c) 0

d) Syntactical Error

15. What is the output of the following code?

any([])

a) 0

b) 1

c) NaN

d) Error

### More Stories

### Stability Analysis by Describing Functions MCQ’s

This set of Control Systems Multiple Choice Questions & Answers (MCQs) focuses on “Stability Analysis by Describing Functions". 1. The...

### Constructing Phase-Trajectories MCQ’s

This set of Control Systems Multiple Choice Questions & Answers (MCQs) focuses on “Constructing Phase-Trajectories". 1. The viscous friction co-efficient,...

### Construction of Phase-Trajectories MCQ’s

This set of Control Systems Multiple Choice Questions & Answers (MCQs) focuses on “Construction of Phase-Trajectories". 1. The open-loop transfer...

### Stability of Nonlinear System-2 MCQ’s

This set of Control Systems Multiple Choice Questions & Answers (MCQs) focuses on “Stability of Nonlinear System-2". 1. With feedback...

### Stability of Nonlinear System-1 MCQ’s

This set of Control Systems Multiple Choice Questions & Answers (MCQs) focuses on “Stability of Nonlinear System-1". 1. A linear...

### Common Physical Nonlinearities MCQ’s

This set of Control Systems Multiple Choice Questions & Answers (MCQs) focuses on “Common Physical Nonlinearities". 1. With feedback _____...

## Average Rating