MCQOPTIONS
Saved Bookmarks
This section includes 1331 Mcqs, each offering curated multiple-choice questions to sharpen your Technical Programming knowledge and support exam preparation. Choose a topic below to get started.
| 1251. |
An exception is caught based on its .............. |
| A. | keyword |
| B. | address |
| C. | type |
| D. | pointer |
| Answer» D. pointer | |
| 1252. |
The functions that are used to access the file in non-sequential fashion ............... and ................... |
| A. | seekf() , seekp() |
| B. | seekg(), seekp() |
| C. | seekp(), seekf() |
| D. | beg(), seekx() |
| Answer» C. seekp(), seekf() | |
| 1253. |
The control automatically passes to the first statement after the loop in |
| A. | continue statement |
| B. | break statement |
| C. | switch statement |
| D. | if statement |
| Answer» C. switch statement | |
| 1254. |
The loop in which the statements within the loop are executed at least once is called |
| A. | do-while |
| B. | while |
| C. | for |
| D. | goto |
| Answer» B. while | |
| 1255. |
................ is a stream connected to standard output. |
| A. | cin |
| B. | gets |
| C. | out |
| D. | cout |
| Answer» E. | |
| 1256. |
................. is a unary operator that returns the memory address of its operand. |
| A. | & |
| B. | ++ |
| C. | _ _ |
| D. | || |
| Answer» B. ++ | |
| 1257. |
The inherited member access specification is to employ ................. within the derived class. |
| A. | class declaration |
| B. | private declaration |
| C. | public declaration |
| D. | access declaration |
| Answer» E. | |
| 1258. |
The keyword virtual precedes the inherited ................ specification. |
| A. | class |
| B. | variable |
| C. | array |
| D. | pointer |
| Answer» B. variable | |
| 1259. |
The number of arguments supplied from the command line, by convention, is known as |
| A. | arg c |
| B. | arg v |
| C. | #define |
| D. | #include |
| Answer» B. arg v | |
| 1260. |
A variable which is visible only in the function in which it is defined, is called |
| A. | static variable |
| B. | auto variable |
| C. | external variable |
| D. | local variable |
| Answer» E. | |
| 1261. |
The statement that transfers control to the beginning of the loop is called |
| A. | break statement |
| B. | exit statement |
| C. | continue statement |
| D. | goto statement |
| Answer» D. goto statement | |
| 1262. |
The class that acquires the properties of parent class is called .................. class. |
| A. | base |
| B. | inherited |
| C. | derived |
| D. | public |
| Answer» D. public | |
| 1263. |
The -> pointer operator is also called as ............... |
| A. | class member access |
| B. | loc::operator |
| C. | element |
| D. | object |
| Answer» B. loc::operator | |
| 1264. |
The ............... function receives the pointer to the region of memory to be free. |
| A. | new |
| B. | delete |
| C. | free |
| D. | alloc |
| Answer» C. free | |
| 1265. |
.............. function is not a member of the class which does not have "this" pointer. |
| A. | Inline |
| B. | Friend |
| C. | Member |
| D. | Void |
| Answer» C. Member | |
| 1266. |
................... must be predefined in the C++ compiler |
| A. | Keywords |
| B. | Variables |
| C. | Identifiers |
| D. | Operators |
| Answer» E. | |
| 1267. |
............... is used to prevent problems when one object is used to initialize others. |
| A. | Default Constructor |
| B. | Parameterized Constructor |
| C. | Copy Constructor |
| D. | Overloading Operator |
| Answer» D. Overloading Operator | |
| 1268. |
................ is the process of using the same name for two or more functions. |
| A. | Function Overloading |
| B. | Operator Overloading |
| C. | Default Function |
| D. | Constructors |
| Answer» B. Operator Overloading | |
| 1269. |
A .............. is an alias or synonym for another variable. |
| A. | reference |
| B. | structure |
| C. | pointer |
| D. | array |
| Answer» B. structure | |
| 1270. |
............... function is a function that calls itself repeatedly. |
| A. | friend |
| B. | inline |
| C. | recursive |
| D. | member |
| Answer» D. member | |
| 1271. |
A ................ defines a class type. |
| A. | structure |
| B. | union |
| C. | enumeration |
| D. | type def |
| Answer» B. union | |
| 1272. |
................ members are public by default and fully compatible. |
| A. | Protected |
| B. | Private |
| C. | Enum |
| D. | Union |
| Answer» E. | |
| 1273. |
................... is automatically created when constructors are used. |
| A. | Objects |
| B. | Destructors |
| C. | Arrays |
| D. | Reference |
| Answer» C. Arrays | |
| 1274. |
Which of the following is FALSE in C |
| A. | Keywords can be used as variable names |
| B. | Variable names can contain a digit |
| C. | Variable names do not contain a blank space |
| D. | Capital letters can be used in variable names |
| Answer» B. Variable names can contain a digit | |
| 1275. |
How many times the following loop be executed { … ch = ‘b’; while(ch >= ‘a’ && ch |
| A. | 0 |
| B. | 25 |
| C. | 26 |
| D. | 1 |
| Answer» C. 26 | |
| 1276. |
The machine registers are sometimes called |
| A. | local variables |
| B. | global variables |
| C. | accumulators |
| D. | static variables |
| Answer» B. global variables | |
| 1277. |
The statement which is used to terminate the control from the loop is |
| A. | break |
| B. | continue |
| C. | goto |
| D. | exit |
| Answer» B. continue | |
| 1278. |
The value that follows the keyword CASE may only be |
| A. | constants |
| B. | variable |
| C. | number |
| D. | semicolon |
| Answer» B. variable | |
| 1279. |
Which of the following is not true in type conversions? |
| A. | The value of RHS is assignment is converted to the type of LHS. |
| B. | When converting from a floating point type to an integer the fractional part will be lost. |
| C. | When constants and variables of different types are mixed in an expression, they are converted to the same type. |
| D. | The conversion from a char to a double is invalid. |
| Answer» E. | |
| 1280. |
The specification of the number 100 as long int is ............. |
| A. | L100 |
| B. | 100 |
| C. | 100L |
| D. | 100l |
| Answer» D. 100l | |
| 1281. |
............ is the escape sequence that causes a backspace. |
| A. | |
| B. | s |
| C. | s |
| D. | a |
| Answer» B. s | |
| 1282. |
The ............... type specifies a valueless expression. |
| A. | int |
| B. | float |
| C. | bool |
| D. | void |
| Answer» E. | |
| 1283. |
The primary difference between float and double is in the ............. of the value they hold |
| A. | address |
| B. | magnitude |
| C. | sign |
| D. | decimal point |
| Answer» C. sign | |
| 1284. |
A/An ............. integer can hold both positive and negative values. |
| A. | unsigned |
| B. | positive |
| C. | negative |
| D. | signed |
| Answer» E. | |
| 1285. |
Which one of the following is invalid variable name? |
| A. | 1count |
| B. | count |
| C. | counta |
| D. | count_a |
| Answer» B. count | |
| 1286. |
.............. is the output operator. |
| A. | >> |
| B. | < |
| C. | > |
| D. | << |
| Answer» E. | |
| 1287. |
To what device is cin linked by default? |
| A. | printer |
| B. | keyboard |
| C. | CPU |
| D. | mouse |
| Answer» C. CPU | |
| 1288. |
Which one of the following is correct assignment of the variable min to zero? |
| A. | min = = 0; |
| B. | min =+ 0 |
| C. | min = 0; |
| D. | min ++ 0 |
| Answer» D. min ++ 0 | |
| 1289. |
............... is initialized when an object is created. |
| A. | Constructor |
| B. | Destructor |
| C. | Array |
| D. | Pointer |
| Answer» B. Destructor | |
| 1290. |
................ function allows creating very efficient code. |
| A. | Friend |
| B. | Member |
| C. | Inline |
| D. | Void |
| Answer» D. Void | |
| 1291. |
A .............. function has access to all private and protected members of the class for which it is a friend. |
| A. | friend |
| B. | member |
| C. | non-member |
| D. | void |
| Answer» B. member | |
| 1292. |
A .............. is an object that contains memory address. |
| A. | constructor |
| B. | destructor |
| C. | pointer |
| D. | temp |
| Answer» D. temp | |
| 1293. |
................. is an implicit parameter to all member functions. |
| A. | Pointer |
| B. | This |
| C. | Enum |
| D. | Array |
| Answer» C. Enum | |
| 1294. |
The ............... function will sort any type of array. |
| A. | tab() |
| B. | tab out() |
| C. | sort() |
| D. | bubble() |
| Answer» E. | |
| 1295. |
The .................. parameter is a standard call by value parameter. |
| A. | tabout() |
| B. | tab |
| C. | out |
| D. | tabout |
| Answer» C. out | |
| 1296. |
The function ................ displays its first argument at the tab position requested by its argument. |
| A. | tab |
| B. | out |
| C. | tabout |
| D. | tab( ) |
| Answer» D. tab( ) | |
| 1297. |
The ................ defines a general set of operation that will be applied to various types of data. |
| A. | generic function |
| B. | member function |
| C. | function overloading |
| D. | operator overloading |
| Answer» B. member function | |
| 1298. |
The ............... is used to create generic function and classes. |
| A. | class |
| B. | template |
| C. | specifier |
| D. | identifier |
| Answer» C. specifier | |
| 1299. |
................ is the elements of a class that are called member or data member. |
| A. | Pointer |
| B. | Variable |
| C. | Character |
| D. | Identifier |
| Answer» C. Character | |
| 1300. |
A ................. access specifier is needed only when inheritance is involved. |
| A. | public |
| B. | Private |
| C. | protected |
| D. | automatic |
| Answer» D. automatic | |