Explore topic-wise MCQs in Matlab.

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.

101.

The mechanism of deriving a new class from another class

A. Polymorphism
B. Inheritance
C. Encapsulation
D. Data hiding
Answer» C. Encapsulation
102.

The same function name having different tasks

A. Function overloading
B. Constructor overloading
C. Polymorphism
D. Operator overloading
Answer» B. Constructor overloading
103.

A function calling itself

A. Inline function
B. Static function
C. Friend function
D. Recursion
Answer» E.
104.

The variable that contains the address of constant or variable

A. Function
B. Array
C. pointer
D. structure
Answer» D. structure
105.

The process of making a function to exhibit different behaviors in different instances is called ‐‐‐‐‐.

A. function overloading
B. operator overloading
C. inheritance
D. none of these
Answer» B. operator overloading
106.

The process of making an operator to exhibit different behaviors in different instances is called ‐‐‐‐‐.

A. function overloading
B. operator overloading
C. inheritance
D. none of these
Answer» C. inheritance
107.

‐‐‐‐‐ refer to the names of variables, functions, arrays, classes, etc.

A. Identifiers
B. Operators
C. Punctuators
D. Manipulators
Answer» B. Operators
108.

‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐ model is also known as linear sequential model.

A. prototype model
B. waterfall model
C. spiral model
D. none of these
Answer» C. spiral model
109.

A member function for unary operator overloading takes‐‐‐‐ ‐arguments.

A. Zero
B. One
C. Two
D. None
Answer» B. One
110.

Which allows you to create a derived class that inherits properties from more than one base class?

A. Multilevel inheritance
B. Multiple inheritance
C. Hybrid Inheritance
D. Hierarchical Inheritanc
Answer» C. Hybrid Inheritance
111.

Consider the following statements:int x = 22,y=15; x = (x>y) ? (x+y) : (x‐y); What will be the value of x after executing these statements?

A. 22
B. 37
C. 7
D. Error. Cannot be executed
Answer» C. 7
112.

In C++ default return type for all the functions is ‐‐‐‐‐‐‐‐‐.

A. int
B. void
C. float
D. none of these
Answer» B. void
113.

The keyword to convert constant into variable

A. Const_cast
B. reinterpret_cast
C. static_cast
D. implicit
Answer» B. reinterpret_cast
114.

In OOP which cocept provides the idea of reusability.

A. inheritance
B. encapsulation
C. data hiding
D. polymorphism
Answer» B. encapsulation
115.

Treating the address of the object of the derived class as the address of the base class means

A. Up casting
B. down casting
C. early binding
D. late binding
Answer» B. down casting
116.

By default, the members of a C++ class are:

A. Private
B. Public
C. Protected
D. None of these
Answer» B. Public
117.

A friend function for binary operator overloading takes‐‐‐‐ ‐arguments.

A. Zero
B. One
C. Two
D. None
Answer» D. None
118.

A __________ is a constructor that either has no parameters, or if it has parameters, all theparameters have default values.

A. default constructor
B. copy constructor
C. Both A and B
D. None of these
Answer» B. copy constructor
119.

Arguments of a functions are separated with

A. comma (,)
B. semicolon (;)
C. colon (:)
D. None of these
Answer» B. semicolon (;)
120.

The result of a Relational operation is always

A. either True or False
B. is less than or is more than
C. is equal or less or more
D. All of these
Answer» B. is less than or is more than
121.

The function contain in the ios class to specify number of decimal places

A. width()
B. precision()
C. fill()
D. setf()
Answer» C. fill()
122.

The class that derived from standard library ios contain input functions

A. Ios
B. iostream
C. istream
D. ostream
Answer» D. ostream
123.

Which of the following is a correct comment?

A. */ Comments */
B. ** Comment **
C. /* Comment */
D. { Comment }
Answer» B. ** Comment **
124.

The technique of Hiding internal details in an object is called‐‐‐‐‐

A. encapsulation
B. functions
C. Abstraction
D. inheritance
Answer» D. inheritance
125.

A friend function for unary operator overloading takes ‐‐‐‐ ‐arguments.

A. Zero
B. One
C. Two
D. None
Answer» C. Two
126.

A ‐‐‐‐‐‐‐‐ is a memory portion of memory to store a determined value.

A. Constant
B. Variable
C. Keyword
D. Separators
Answer» C. Keyword
127.

Strings are character arrays. The last index of it contains the null‐terminated character

A. \n
B. \t
C. \0
D. \1
Answer» D. \1
128.

Find the false statement from the following

A. An identifier in C++ is defined as an unlimited sequence of characters.
B. The first character must be an alphabet followed by digits or underscore or alphabets.
C. Identifiers are not case sensitive.
D. You can use both uppercase and lower case alphabets in the same identifier.
Answer» D. You can use both uppercase and lower case alphabets in the same identifier.
129.

The function that act as an interface to base & derived class

A. function overloading
B. virtual function
C. constructor
D. friend
Answer» C. constructor
130.

When following piece of code is executed, what happens?b = 3; a = b++;

A. a contains 3 and b contains 4
B. a contains 4 and b contains 4
C. a contains 4 and b contains 3
D. a contains 3 and b contains 3
Answer» B. a contains 4 and b contains 4
131.

int d=int (a) + int (b);This statement is an example of ‐‐‐‐‐‐‐

A. Implicit conversion
B. Explicit conversion
C. Internal conversion
D. External conversion
Answer» C. Internal conversion
132.

In case of arguments passed by values when calling a function such as z=addidion(x,y),

A. Any modifications to the variables x & y from inside the function will not have any effect outside the function.
B. The variables x and y will be updated when any modification is done in the function
C. The variables x and y are passed to the function addition
D. None of above are valid.
Answer» B. The variables x and y will be updated when any modification is done in the function
133.

An identifier may ‐‐‐‐‐‐‐‐

A. Strings, that varies at program execution.
B. Those numbers, that is frequently required in programs.
C. The name of a variable.
D. None of these
Answer» D. None of these
134.

The standard ASCII characters have numeric values from ‐‐‐ to ‐‐‐‐

A. 0 to 128
B. 0 to 127
C. 0 to 255
D. 0 to 256
Answer» C. 0 to 255
135.

The function used to display one line at a time

A. get()
B. put()
C. getline()
D. write()
Answer» E.
136.

The function used to receive one line at a time

A. get()
B. put()
C. getline()
D. write()
Answer» D. write()
137.

Which of the following is selection statement in C++?

A. Break
B. goto
C. exit
D. switch
Answer» E.
138.

The operator “>>” is called ‐‐‐‐‐

A. Extraction operator
B. Insertion operator
C. Put to operator
D. Printing operator
Answer» B. Insertion operator
139.

Identify the unary operator.

A. ? , :
B. ++
C. +
D. %
Answer» C. +
140.

The continue statement

A. resumes the program if it is hanged
B. resumes the program if it was break was applied
C. skips the rest of the loop in current iteration
D. all of above
Answer» D. all of above
141.

C++ is originally developed by

A. Nicolas Wirth
B. Dennis Ritchi
C. Bjarne Stroustrup
D. Ken Thompson
Answer» D. Ken Thompson
142.

The >> operator is known as‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐.

A. put to
B. get from
C. extraction
D. both b & c
Answer» E.
143.

A ‐‐‐‐‐‐‐‐ for an object is a request for execution of a procedure.

A. object
B. functions
C. dynamic binding
D. message
Answer» E.
144.

The class that is not used to create object

A. Abstract class
B. Virtual base class
C. Multiple inheritance
D. Nesting of classes
Answer» B. Virtual base class
145.

When a function is defined inside a class,it is treated as ‐‐‐‐‐‐‐

A. Inline function
B. Inside definition
C. Inline definition
D. Data function
Answer» B. Inside definition
146.

OOPs follows ‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐ approach during program design.

A. top down
B. bottom ‐up
C. both a & b
D. none of these
Answer» C. both a & b
147.

‐‐‐‐‐ are the reserved words of the programming language.

A. Tokens
B. Literals
C. Separators
D. Keywords
Answer» E.
148.

‐‐‐‐‐‐‐‐ contains function prototype for the standard input and output functions.

A. iomanip.h
B. iostream.h
C. stdlib.h
D. both a & b
Answer» C. stdlib.h
149.

What happens when a class with parameterized constructors and having no default constructor is used in a program and we create an object that needs a zero‐argument constructor?

A. Compile‐time error.
B. Preprocessing error.
C. Runtime error.
D. Runtime exception.
Answer» B. Preprocessing error.
150.

The class that derived from standard library ios contain output functions

A. Ios
B. iostream
C. istream
D. ostream
Answer» E.