June 12, 2021

# Errors in Input – 2 MCQ’s

Read Time:1 Minute, 35 Second

This set of MATLAB Multiple Choice Questions & Answers (MCQs) focuses on “Errors in Input – 2″.

1. What is the output of the following code?

`clipboard('Do re Mi fa','copy')`

a) Error in hierarchy
b) Copies the input text to the system clipboard
c) Replaces any text, in the clipboard, with the input text
d) Syntactical Error

2. What is the output of the following code?

`pd=makedist('Uniform','Lower',3)`

a) Error in giving limits
b) A uniform distribution with lower limit 3 and upper limit Infinity
c) Error in syntax
d) Error due to the command

3. What is the output of the following code?

`isvector((49 32));`

a) Error in ()
b) Error due to absence of comma
c) Error due to command
d) Logical 1

4. What is the output of the following code?

```p=input('');
po```

a) ‘po’ gets assigned to p
b) Error in the input
c) Error due to syntax
d) Cannot be determined

5. What is the output of the following code?

`commandhistory[]`

a) Error
b) Shows command history
c) Shows the previous command used
d) Prints all the commands used for the current session

6. What is the output of the following code?

`p=input[''];`

a) Asks for an input
b) Error in the input
c) Error due to syntax
d) Cannot be determined

7. What is the output of the following code?

`sumsqr([1 2; 'NaN' 4])`

a) 21
b) Error due to NaN
c) Error due to ‘NaN’
d) 9

8. What is the output of the following code?

`pd=makedist('Uniform','-Inf',lower,'Inf',upper)`

a) Makes a uniform distribution ranging from -Inf to Inf
b) Error due to Inf
c) Error due to syntax
d) Logical Error

9. If a character input is given to a command which only takes integers, it’ll always give an error.
a) True
b) False

10. The uniform distribution can range from -infinity to 0 or 0 to Infinity but not from -infinity to infinity.
a) True
b) False

Happy
0 %
Sad
0 %
Excited
0 %
Sleepy
0 %
Angry
0 %
Surprise
0 %

5 Star
0%
4 Star
0%
3 Star
0%
2 Star
0%
1 Star
0%