

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.
51. |
The standard library inherited from istream & ostream |
A. | Ios |
B. | iostream |
C. | ifstream |
D. | ofstream |
Answer» C. ifstream | |
52. |
The duplication of inherited members due to the multiple paths can be avoided by making acommon base class is called |
A. | Abstract class |
B. | Virtual base class |
C. | Multiple inheritance |
D. | Nesting of classes |
Answer» C. Multiple inheritance | |
53. |
What will be the values of x, m and n after the execution of the following statements? int x, m, n;m = 10; n = 15; x = ++m + n++; |
A. | x=25, m=10, n=15 |
B. | x=26, m=11, n=16 |
C. | x=27, m=11, n=16 |
D. | x=27, m=10, n=15 |
Answer» C. x=27, m=11, n=16 | |
54. |
‐‐‐‐‐‐‐‐‐‐‐ Statement used to branch unconditionally from one point to another in the program. |
A. | Jump |
B. | goto |
C. | break |
D. | exit(0) |
Answer» C. break | |
55. |
The instructions, which are used in programming, are called ‐‐‐‐‐‐‐‐ |
A. | Data type |
B. | Keywords |
C. | Objects |
D. | Identifiers |
Answer» C. Objects | |
56. |
Which of the following statements are correct for a static member function?1. It can access only other static members of its class. 2. It can be called using the class name, instead of objects. |
A. | Only 1 is correct. |
B. | Only 2 is correct. |
C. | Both 1 and 2 are correct. |
D. | Both 1 and 2 are incorrect. |
Answer» D. Both 1 and 2 are incorrect. | |
57. |
The ‐‐‐‐‐‐‐ are used to check the relationship between two numeric operands or expressions. |
A. | Logical operators |
B. | Relational operators |
C. | Arithmetic operators |
D. | Bitwise operators |
Answer» C. Arithmetic operators | |
58. |
‐‐‐‐‐‐ refers to the use of the same thing for different purpose. |
A. | Function declaration |
B. | Overloading |
C. | Function calling |
D. | Prototyping |
Answer» C. Function calling | |
59. |
Which of the following function that must contain in all C++ Programs |
A. | start() |
B. | system() |
C. | main() |
D. | program() |
Answer» D. program() | |
60. |
Identify the data type of the value ‐2567113254L |
A. | Long integer |
B. | Integer |
C. | Short integer |
D. | Big integer |
Answer» B. Integer | |
61. |
The function contain in the ios class to set width |
A. | width() |
B. | precision() |
C. | fill() |
D. | setf() |
Answer» B. precision() | |
62. |
Write the range of value of the data type ‘int’ |
A. | ‐32,768 to 32,767 |
B. | 0 to 65535 |
C. | 0 to 65536 |
D. | 0 to 32768 |
Answer» B. 0 to 65535 | |
63. |
Which function is in the ostream class |
A. | get() |
B. | read() |
C. | write |
D. | cin |
Answer» D. cin | |
64. |
Which of the following statement is correct with respect to the use of friend keyword insidea class? |
A. | A private data member can be declared as a friend. |
B. | A class may be declared as a friend. |
C. | An object may be declared as a friend. |
D. | We can use friend keyword as a class name. |
Answer» C. An object may be declared as a friend. | |
65. |
‐‐‐‐‐‐‐‐‐‐ provides interface between the object’s data and program. |
A. | object |
B. | functions |
C. | class |
D. | polymorphism |
Answer» C. class | |
66. |
‐‐‐‐‐ function can only be called by another function that is a member of its class. |
A. | Member function |
B. | Private member function |
C. | Nested member function |
D. | Public member function |
Answer» C. Nested member function | |
67. |
The function contain in the ios class to fill characters in the blank space |
A. | width() |
B. | precision() |
C. | fill() |
D. | setf() |
Answer» D. setf() | |
68. |
The functions declared inside the class is known as ‐‐‐‐‐‐‐‐ |
A. | Data members |
B. | Library functions |
C. | Member functions |
D. | User defined functions |
Answer» D. User defined functions | |
69. |
Which of the following is not a feature of OOPs. |
A. | polymorphism |
B. | inheritance |
C. | dynamic binding |
D. | none of these. |
Answer» E. | |
70. |
A variable is/are |
A. | String that varies during program execution |
B. | A portion of memory to store a determined value |
C. | Those numbers that are frequently required in programs |
D. | None of these |
Answer» C. Those numbers that are frequently required in programs | |
71. |
The mechanism of deriving one base class with more than one derived classes |
A. | Multilevel inheritance |
B. | Multiple inheritance |
C. | Hybrid Inheritance |
D. | Hierarchical Inheritance |
Answer» E. | |
72. |
‐‐‐‐‐ statement is used to print a blank line in CPP program |
A. | “\n” |
B. | endl |
C. | Both ‘a’ and ‘b’ |
D. | None of these |
Answer» D. None of these | |
73. |
The wrapping up of data and functions into a single unit is called ‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐. |
A. | inheritance |
B. | encapsulation |
C. | data hiding |
D. | polymorphism |
Answer» C. data hiding | |
74. |
The function contain in the class iomanip to fill characters in the un used space |
A. | setw() |
B. | set precision() |
C. | set fill() |
D. | setiosflags() |
Answer» D. setiosflags() | |
75. |
The function contain in the class iomanip to set width |
A. | setw() |
B. | set precision() |
C. | set fill() |
D. | setiosflags() |
Answer» B. set precision() | |
76. |
The function used to disply one character at a time |
A. | get() |
B. | put() |
C. | getline() |
D. | write() |
Answer» C. getline() | |
77. |
classes are ‐‐‐‐‐‐‐‐ datatype. |
A. | derived |
B. | user‐defined |
C. | built‐in |
D. | both a & c |
Answer» C. built‐in | |
78. |
Which of the following statement will be correct if the function has three arguments passedto it? |
A. | The trailing argument will be the default argument. |
B. | The first argument will be the default argument. |
C. | The middle argument will be the default argument. |
D. | All the argument will be the default argument. |
Answer» B. The first argument will be the default argument. | |
79. |
The << operator is known as‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐. |
A. | put to |
B. | get from |
C. | insertion |
D. | both a & c |
Answer» E. | |
80. |
The keyword to convert pointer into non pointer & non pointer into pointer |
A. | Const_cast |
B. | reinterpret_cast |
C. | static_cast |
D. | implicit |
Answer» C. static_cast | |
81. |
A function with the same name as the class, but preceded with a tilde character (~) is called__________ of that class. |
A. | constructor |
B. | destructor |
C. | function |
D. | object |
Answer» C. function | |
82. |
The ‐‐‐‐‐‐‐‐‐ principle helps the programmer to build secure programs. |
A. | operator overloading |
B. | encapsulation |
C. | data hiding |
D. | polymorphism |
Answer» D. polymorphism | |
83. |
Which one of the following is the correct operator to compare two values |
A. | := |
B. | 0 |
C. | Equal |
D. | 0 |
Answer» E. | |
84. |
A ‐‐‐‐‐ is the name of the storage location |
A. | Identifier |
B. | Variable |
C. | Keyword |
D. | Token |
Answer» C. Keyword | |
85. |
What are the basic run time entities in an object oriented program? |
A. | objects |
B. | functions |
C. | datas |
D. | none of these |
Answer» B. functions | |
86. |
What is the final value of x when the code int x; for(x=0; x<10; x++) {} is run? |
A. | 10 |
B. | 9 |
C. | 1 |
Answer» B. 9 | |
87. |
‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐ refers to the linking of procedure call to the code to be executed in response to thecall. |
A. | polymorphism |
B. | functions |
C. | dynamic binding |
D. | object |
Answer» D. object | |
88. |
The function that is a bridge between two classes |
A. | Friend function |
B. | Nesting of member function |
C. | Inline function |
D. | Static function |
Answer» B. Nesting of member function | |
89. |
A stream of byte that is the interface between IO and IO devices |
A. | Streams |
B. | class |
C. | object |
D. | file |
Answer» B. class | |
90. |
Which of the following is a UML constituents |
A. | things |
B. | relationships |
C. | diagrams |
D. | all of the above |
Answer» E. | |
91. |
Which of the following is an exit controlled loop? |
A. | While |
B. | For |
C. | Switch |
D. | do…. While |
Answer» E. | |
92. |
Find out the error in following block of code. If (x = 100) Cout << “x is 100”; |
A. | 100 should be enclosed in quotations |
B. | There is no semicolon at the end of first line |
C. | Equals to operator mistake |
D. | Variable x should not be inside quotation |
Answer» D. Variable x should not be inside quotation | |
93. |
Conversion of data type is called |
A. | self referencing |
B. | type casting |
C. | virtual function |
D. | abstract class |
Answer» C. virtual function | |
94. |
_________ used to make a copy of one class object from another class object of the sameclass type. |
A. | constructor |
B. | copy constructor |
C. | destructor |
D. | default constructor |
Answer» C. destructor | |
95. |
A derived class with only one base class |
A. | Multilevel inheritance |
B. | Multiple inheritance |
C. | Single inheritance |
D. | Hierarchical Inheritance |
Answer» D. Hierarchical Inheritance | |
96. |
The mechanism of giving special meaning to an operator |
A. | Operator overloading |
B. | Function overloading |
C. | Constructor overloading |
D. | Virtual function |
Answer» B. Function overloading | |
97. |
Which of the following means "The use of an object of one class in definition of anotherclass"? |
A. | Encapsulation |
B. | Inheritance |
C. | Composition |
D. | Abstraction |
Answer» D. Abstraction | |
98. |
Observe following function declaration and choose the best Ans:: int divide ( int a, int b = 2 ) |
A. | Variable b is of integer type and will always have value 2 |
B. | Variable a and b are of int type and the initial value of both variables is 2 |
C. | Variable b is international scope and will have value 2 |
D. | Variable b will have value 2 if not specified when calling function |
Answer» E. | |
99. |
The qualifier ‐‐‐‐‐‐ tells the compiler that the function should not modify the argument. |
A. | Const |
B. | Static |
C. | Constant |
D. | Inline |
Answer» B. Static | |
100. |
‐‐‐‐‐‐‐‐ are normally used to maintain values common to the entire class. |
A. | Dynamic variables |
B. | Static variables |
C. | Private variables |
D. | Public variables |
Answer» C. Private variables | |