MCQOPTIONS
Saved Bookmarks
This section includes 301 Mcqs, each offering curated multiple-choice questions to sharpen your Matlab knowledge and support exam preparation. Choose a topic below to get started.
| 251. |
Which of the following is true about pure virtual functions?1) Their implementation is not provided in a class where they are declared.2) If a class has a pure virtual function, then the class becomes abstract class and aninstance of this class cannot be created. |
| A. | Both 1 and 2 |
| B. | Only 1 |
| C. | Only 2 |
| D. | Neither 1 nor 2 |
| Answer» D. Neither 1 nor 2 | |
| 252. |
Which of the following is true about this pointer? |
| A. | It is passed as a hidden argument to all function calls |
| B. | It is passed as a hidden argument to all non-static function calls |
| C. | It is passed as a hidden argument to all static functions |
| D. | None of the above |
| Answer» C. It is passed as a hidden argument to all static functions | |
| 253. |
When a language has the capability to produce new data type mean, it can be called as …... |
| A. | overloaded |
| B. | extensible |
| C. | encapsulated |
| D. | reprehensible |
| Answer» C. encapsulated | |
| 254. |
Variable that are listed in function's calls are called |
| A. | Actual parameter |
| B. | Declared parameter |
| C. | Passed parameter |
| D. | None |
| Answer» C. Passed parameter | |
| 255. |
Which of the following functions must use reference? |
| A. | Assignment operator function |
| B. | Copy Constructor |
| C. | Destructor |
| D. | Parameterized constructor |
| Answer» C. Destructor | |
| 256. |
All logical operators operate on at least two operands. |
| A. | True |
| B. | False |
| Answer» C. | |
| 257. |
The narginchk command can limit the size of which cellular array? |
| A. | fun |
| B. | rand(2) |
| C. | eye(3) |
| D. | varargin |
| Answer» E. | |
| 258. |
The dbcont command, if placed in an m.file, will __________ |
| A. | not allow the function to be saved |
| B. | give error when we enter dbcont in debug mode |
| C. | will give an error during function call |
| D. | dbcont does not exist |
| Answer» C. will give an error during function call | |
| 259. |
The dbstop command, for functions stored in the system memory, with a line mentioned will __________ |
| A. | pause the evaluation of the function before the mentioned line |
| B. | exit the evaluation of the function before the mentioned line |
| C. | pause the evaluation of the function during the mentioned line |
| D. | pause the evaluation of the function after the mentioned line |
| Answer» B. exit the evaluation of the function before the mentioned line | |
| 260. |
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 |
| Answer» B. only imaginary part of complex numbers | |
| 261. |
What is the working of the varargin command? |
| A. | takes 1*N inputs after the defined inputs in a function |
| B. | takes N*1 inputs after the defined inputs in a function |
| C. | takes N*N inputs after the defined inputs in a function |
| D. | takes 1*1 inputs after the defined inputs in a function |
| Answer» B. takes N*1 inputs after the defined inputs in a function | |
| 262. |
The precedence of : operator is after | and before &. |
| A. | True |
| B. | False |
| Answer» C. | |
| 263. |
How much does the precision change while finding sin(x) using evalc and eval? |
| A. | 0.1 |
| B. | 0.02 |
| C. | 0.2 |
| D. | No change |
| Answer» E. | |
| 264. |
The debug commands can be run in |
| A. | functions |
| B. | live scripts |
| C. | command window |
| D. | nowhere |
| Answer» D. nowhere | |
| 265. |
The for keyword can be used to evaluate expressions using eval(). |
| A. | True |
| B. | False |
| Answer» C. | |
| 266. |
The input to the evalc command is given using {}. |
| A. | True |
| B. | False |
| Answer» C. | |
| 267. |
What will happen if we don't give an otherwise block to our switch structure? |
| A. | Error |
| B. | Infinitely demands a correct variable for case |
| C. | Returns 0 |
| D. | Moves on to the next block |
| Answer» E. | |
| 268. |
The switch-case structure is a _________ |
| A. | Conditional structure |
| B. | Logical structure |
| C. | Multidimensional structure |
| D. | Hierarchical structure |
| Answer» C. Multidimensional structure | |
| 269. |
The ~ is ______ |
| A. | Quaternary operator |
| B. | Relational Operator |
| C. | Arithmetic Operator |
| D. | Unary Operator |
| Answer» E. | |
| 270. |
In nested loops, the continue statement, if present within a nested if structure, will exit the ____________ |
| A. | If structure |
| B. | nested if structure |
| C. | entire loop |
| D. | present iteration |
| Answer» C. entire loop | |
| 271. |
The correct hierarchy of operations is ________ |
| A. | <.<=,|,& |
| B. | >,>=,&,| |
| C. | <,>=,|,& |
| D. | <,|,>,& |
| Answer» C. <,>=,|,& | |
| 272. |
While running a loop in MATLAB, it does not require indentation. |
| A. | True |
| B. | False |
| Answer» B. False | |
| 273. |
What is the working of the nargout command? |
| A. | Gets assigned to a number which is equal to the number of outputs-1 sought from a subfunction |
| B. | Gets assigned to a number which is equal to the number of outputs-1 sought from a function |
| C. | Gets assigned to a number which is equal to the number of outputs sought from a function |
| D. | Gets assigned to a number which is equal to the number of outputs+1 sought from a function |
| Answer» D. Gets assigned to a number which is equal to the number of outputs+1 sought from a function | |
| 274. |
Before starting a new case, we have to end the previous case using ___________ |
| A. | Break statement |
| B. | Continue statement |
| C. | Return statement |
| D. | No statement |
| Answer» E. | |
| 275. |
The eval command can evaluate __________ |
| A. | A single function |
| B. | Only a single command |
| C. | The function does not exist |
| D. | Multiple commands |
| Answer» E. | |
| 276. |
The if-else structure does not allow ___________ |
| A. | Return statement |
| B. | End statement |
| C. | Endif statement |
| D. | Break statement |
| Answer» E. | |
| 277. |
What is common to evalc and the eval commands, apart from the output? |
| A. | The error message is displayed separately |
| B. | The outputs are of different accuracy |
| C. | There is nothing common |
| D. | evalc does not exist |
| Answer» B. The outputs are of different accuracy | |
| 278. |
The nargoutchk command limits the length of which cellular array? |
| A. | varargout |
| B. | i(2) |
| C. | random(69) |
| D. | laplace(s) |
| Answer» B. i(2) | |
| 279. |
The return command is similar to the dbcont command. |
| A. | True |
| B. | False |
| Answer» B. False | |
| 280. |
The input to the eval command is given using []. |
| A. | True |
| B. | False |
| Answer» C. | |
| 281. |
The for loop performs at least ___ iteration/s. |
| A. | 1 |
| B. | not necessarily an iteration |
| C. | 2 |
| D. | Error |
| Answer» C. 2 | |
| 282. |
'=' is a? |
| A. | Relational operator |
| B. | Arithmetic operator |
| C. | Operational operator |
| D. | Assignment operator |
| Answer» E. | |
| 283. |
We cannot use a ____ statement if the if-else structure is not part of a loop. |
| A. | continue |
| B. | if-else |
| C. | clc |
| D. | plot() |
| Answer» B. if-else | |
| 284. |
The default exponential order for %e and %E is same. |
| A. | True |
| B. | False |
| Answer» B. False | |
| 285. |
If a logical expression is true, it will always return a logical 1 and if it's false, it'll always return a 0. |
| A. | True |
| B. | False |
| Answer» B. False | |
| 286. |
Which function gets disabled while using evalc()? |
| A. | diary |
| B. | sin |
| C. | inf |
| D. | round |
| Answer» B. sin | |
| 287. |
We cannot use a ____ statement in the standalone if-else structure. |
| A. | break |
| B. | if-else |
| C. | return |
| D. | switch-case |
| Answer» B. if-else | |
| 288. |
How can we influence the disp command with format specifiers? |
| A. | Not possible |
| B. | Via the sprintf() command |
| C. | Use format specifiers as string input |
| D. | Give format specifiers as input only |
| Answer» E. | |
| 289. |
While developing a switch-case structure, the value for case can be _________ |
| A. | Single only |
| B. | Multiple |
| C. | Infinite |
| D. | 0 |
| Answer» C. Infinite | |
| 290. |
In nested loops, the continue statement, if present within an if structure, will exit the ____________ |
| A. | If structure |
| B. | current iteration |
| C. | entire loop |
| D. | Error |
| Answer» C. entire loop | |
| 291. |
A function ______________ |
| A. | can be run in the command window by defining it in the window itself |
| B. | can be run in the command window by defining it in a cpp file |
| C. | can be run in the command window by defining it in a script file |
| D. | can be run in the script file by defining it in the command window |
| Answer» D. can be run in the script file by defining it in the command window | |
| 292. |
The continue statement can be used in a switch-case structure. |
| A. | True |
| B. | False |
| Answer» C. | |
| 293. |
The number of iterations run for any loop by MATLAB is always _____________ |
| A. | a positive integer |
| B. | a negative integer |
| C. | a number |
| D. | a decimal number |
| Answer» D. a decimal number | |
| 294. |
The working of the varargin command is dependent on the nargin command implicitly. |
| A. | True |
| B. | False |
| Answer» C. | |
| 295. |
The effective working of the continue keyword in the final iteration is same as the effective working of the break keyword. |
| A. | True |
| B. | False |
| Answer» B. False | |
| 296. |
The feval command can evaluate __________ |
| A. | A single command |
| B. | Multiple commands |
| C. | Multiple functions |
| D. | No such function exists |
| Answer» B. Multiple commands | |
| 297. |
The disp() command cannot print anything but inputs given within string arguments. |
| A. | True |
| B. | False |
| Answer» C. | |
| 298. |
The precedence of Transpose operation is ____________ |
| A. | after & |
| B. | after | |
| C. | before .^ |
| D. | after ^ |
| Answer» D. after ^ | |
| 299. |
The condition of a while loop cannot be given in ________ |
| A. | () |
| B. | [] |
| C. | {} |
| D. | <> |
| Answer» D. <> | |
| 300. |
The if structure is a _________ |
| A. | Conditional structure |
| B. | Logical structure |
| C. | Nested structure |
| D. | Biased structure |
| Answer» B. Logical structure | |