MCQOPTIONS
Saved Bookmarks
This section includes 4320 Mcqs, each offering curated multiple-choice questions to sharpen your Engineering knowledge and support exam preparation. Choose a topic below to get started.
| 701. |
Values that are used to end loops are referred to as _____ values |
| A. | end |
| B. | finish |
| C. | sentinel |
| D. | stop |
| Answer» D. stop | |
| 702. |
Which of the following flowchart symbols represents the if selection structure? |
| A. | diamond |
| B. | hexagon |
| C. | oval |
| D. | parallelogram |
| E. | rectangle |
| Answer» B. hexagon | |
| 703. |
Variables that are known only to the function in which they are declared are called _____ variables |
| A. | global |
| B. | local |
| C. | main |
| D. | separate |
| E. | void |
| Answer» C. main | |
| 704. |
The expression c = i++ causes |
| A. | the value of i assigned to c and then i incremented by 1 |
| B. | i to be incremented by 1 and then the value of i assigned to c |
| C. | value of i assigned to c |
| D. | i to be incremented by 1 |
| E. | None of the above |
| Answer» B. i to be incremented by 1 and then the value of i assigned to c | |
| 705. |
In a template function, _____ argument is generic, or parameterized |
| A. | no |
| B. | exactly one |
| C. | at least one |
| D. | more than one |
| Answer» D. more than one | |
| 706. |
You define a structure type globally because |
| A. | you save many lines of code by not rewriting an identical structure definition in each function that uses it |
| B. | you will never change its definition |
| C. | it is required in C++ |
| D. | all of the above |
| Answer» B. you will never change its definition | |
| 707. |
In the expression p --> val,p is a(n) |
| A. | address |
| B. | pointer |
| C. | structure |
| D. | header |
| Answer» C. structure | |
| 708. |
Object-oriented programmers primarily focus on _________ |
| A. | procedures to be performed |
| B. | the step-by-step statements needed to solve a problem |
| C. | objects and the tasks that must be performed with those objects |
| D. | the physical orientation of objects within a program |
| Answer» D. the physical orientation of objects within a program | |
| 709. |
In the C language, a string is assigned to the |
| A. | char type of variable |
| B. | string type of variable |
| C. | conversion specification %s |
| D. | All of the above |
| Answer» B. string type of variable | |
| 710. |
Which of the following statements declares a one-dimensional Character array named item that consists of five elements? |
| A. | char item[0 to 4] = ""; |
| B. | char item[0 to 5] = ""; |
| C. | char item[4] = ""; |
| D. | char item[5] = ""; |
| E. | string item[5] = ' '; |
| Answer» E. string item[5] = ' '; | |
| 711. |
A function's purpose is to print customer data. Which of the following is the best name for this function? |
| A. | pcd(). It's short for "print customer data" and takes few keystrokes |
| B. | Printcustomerdata(). It states everything the function will do |
| C. | printCustomer(). It states the function's purpose and is easy to read |
| D. | lastFunction(). It is the final function called in most programs, and this name identifies the function's timing |
| Answer» D. lastFunction(). It is the final function called in most programs, and this name identifies the function's timing | |
| 712. |
The function whose prototype is void getData(Item &thing); receives |
| A. | a pointer to a structure |
| B. | a reference to a structure |
| C. | a copy of a structure |
| D. | nothing |
| Answer» C. a copy of a structure | |
| 713. |
An identifier in C |
| A. | is a name of a thing such as variable and function |
| B. | is made up of letters, numerals, and the underscore |
| C. | can contain both uppercase and lowercase letters |
| D. | All of the above |
| E. | None of the above |
| Answer» E. None of the above | |
| 714. |
The bitwise AND operator is represented by the symbol |
| A. | ^ |
| B. | & |
| C. | && |
| D. | >> |
| E. | None of the above |
| Answer» C. && | |
| 715. |
The function strcmp("Jose", "JOSE") will return _____ |
| A. | - 1 |
| B. | 0 |
| C. | 1 |
| Answer» D. | |
| 716. |
A pointer to void can hold pointers to |
| A. | char type |
| B. | int type |
| C. | float type |
| D. | any data type |
| Answer» E. | |
| 717. |
Which of the following is the extraction operator? |
| A. | >> |
| B. | << |
| C. | // |
| D. | /* |
| E. | both (a) and (b) |
| Answer» B. << | |
| 718. |
You indicate a variable is a pointer variable by placing a(n) _____ in front of the variable's name |
| A. | asterisk |
| B. | ampersand |
| C. | dollar sign |
| D. | exclamation point |
| Answer» B. ampersand | |
| 719. |
The exclusive OR operator gives the result 1 when |
| A. | both the bits are 0 |
| B. | one bit is 0 and the other is 1 |
| C. | both the bits are 1 |
| D. | no hard and fast rule |
| E. | None of the above |
| Answer» C. both the bits are 1 | |
| 720. |
The main() function is always |
| A. | a called function |
| B. | a calling function |
| C. | recursive function |
| D. | used at the end of the program |
| E. | None of the above |
| Answer» C. recursive function | |
| 721. |
A function can make_________ |
| A. | one throw |
| B. | one throw of each scalar type |
| C. | one throw of each programmer-defined type |
| D. | as many throws of as many types as necessary |
| Answer» E. | |
| 722. |
A default exception block must be placed _____ |
| A. | first among the catch blocks |
| B. | last among the catch blocks |
| C. | globally, at the top of the file |
| D. | at the end of all code in the program |
| Answer» C. globally, at the top of the file | |
| 723. |
Which of the following is the scope resolution operator? |
| A. | ->> |
| B. | :: |
| C. | * |
| D. | & |
| Answer» C. * | |
| 724. |
When a multidimensional array is accessed, each array index is |
| A. | separated by commas |
| B. | surrounded by brackets and separated by commas |
| C. | separated by commas and surrounded by brackets |
| D. | surrounded by brackets |
| Answer» E. | |
| 725. |
To create a variable, you must assign _____ to it |
| A. | a data type |
| B. | a name |
| C. | both a data type and a name |
| D. | the word var |
| Answer» D. the word var | |
| 726. |
The loosest type of coupling is |
| A. | data coupling |
| B. | control coupling |
| C. | external coupling |
| D. | pathological coupling |
| Answer» B. control coupling | |
| 727. |
Which of the following is a string literal constant? |
| A. | "Visual C++" |
| B. | "137.45" |
| C. | "A" |
| D. | "2,365" |
| E. | All of the above |
| Answer» F. | |
| 728. |
A child class _____ exist if there is no parent class |
| A. | must |
| B. | may |
| C. | cannot |
| D. | can |
| Answer» D. can | |
| 729. |
One way in which a structure differs from an array is that |
| A. | a structure may have members of more than one type |
| B. | a structure must have members that are all the same type |
| C. | an array may have members of more than one type |
| D. | there is no difference between a structure and an array |
| Answer» B. a structure must have members that are all the same type | |
| 730. |
Variables that hold memory addresses are called _____ |
| A. | subscripts |
| B. | holders |
| C. | pointers |
| D. | indicators |
| Answer» D. indicators | |
| 731. |
The general form of do-while statement is |
| A. | do expression while statement; |
| B. | do while expression; |
| C. | do statement while (expression); |
| D. | do statement while statement; |
| E. | None of the above |
| Answer» D. do statement while statement; | |
| 732. |
The measure of how well the operations in a function relate to one another is _____ |
| A. | coupling |
| B. | cohesion |
| C. | adhesion |
| D. | conversion |
| Answer» C. adhesion | |
| 733. |
The comma operator (,) is used to |
| A. | permit two different expressions to appear in situations where only one expression would ordinarily be used |
| B. | terminate loops or to exit from switch |
| C. | alter the normal sequence of program execution by transferring control to some other part of the program |
| D. | carry out a logical test and then take one of two possible actions, depending upon the outcome of the test |
| E. | None of the above |
| Answer» B. terminate loops or to exit from switch | |
| 734. |
If you want to override constructor default values for an object you are instantiating, you must also override |
| A. | all other parameters to that constructor |
| B. | all parameters to the left of that value |
| C. | all parameters to the right of that value |
| D. | no other parameters to that constructor |
| Answer» C. all parameters to the right of that value | |
| 735. |
An unsigned double type of data |
| A. | can have only positive values |
| B. | does not exist |
| C. | is always less than 1010 |
| D. | can have only negative values |
| E. | None of the above |
| Answer» B. does not exist | |
| 736. |
When the function char someFunction(int x) is executed, |
| A. | it will throw nothing |
| B. | it will throw an integer |
| C. | it will throw a character |
| D. | it may or may not throw anything |
| Answer» E. | |
| 737. |
The major advantage of data hiding is that _____ |
| A. | your programs can include more data |
| B. | you no longer need functions |
| C. | no one can ever use your data |
| D. | your data will be used correctly |
| Answer» E. | |
| 738. |
The letter V is a _____ |
| A. | character literal constant |
| B. | numeric literal constant |
| C. | string literal constant |
| D. | variable |
| Answer» B. numeric literal constant | |
| 739. |
Separating parts of a program into units that remain unaffected by other parts of a program is the concept known as _____ |
| A. | intrusion |
| B. | volatility |
| C. | encapsulation |
| D. | protection |
| Answer» D. protection | |
| 740. |
A function whose purpose is to send messages to other functions is known as a _____ |
| A. | dispatcher |
| B. | courier |
| C. | messenger |
| D. | sender |
| Answer» B. courier | |
| 741. |
With commercial classes, the function source code is usually________ |
| A. | printed on high-quality paper |
| B. | poorly written |
| C. | provided on a disk |
| D. | provided in object form |
| Answer» E. | |
| 742. |
The type of value that a function sends back to the function that calls it is known as its _____ |
| A. | type |
| B. | return value |
| C. | reference data |
| D. | sentinel |
| Answer» C. reference data | |
| 743. |
Assume that a program includes the short *agePtr = NULL; statement. The name of the pointer is _____ |
| A. | *agePtr |
| B. | agePtr |
| Answer» C. | |
| 744. |
Which of the following are never inherited? |
| A. | public data members |
| B. | constructor functions |
| C. | void functions |
| D. | overloaded + operators |
| Answer» C. void functions | |
| 745. |
The main difference in operation between an 'if statement and a 'while' statement is |
| A. | the 'while' loop body is executed |
| B. | the body of the 'while' statement may be executed many times, the body of the 'if statements only once |
| C. | the conditional expression following the keyboard is evaluated differently |
| D. | All of the above |
| E. | None of the above |
| Answer» C. the conditional expression following the keyboard is evaluated differently | |
| 746. |
If a class object is thrown with a throw statement, then a subsequent catch block has a usable match if the type of the catch argument is_________ |
| A. | a parent class of the thrown class |
| B. | a child class of the thrown class |
| C. | either (a) or (b) |
| D. | neither (a) nor (b) |
| Answer» B. a child class of the thrown class | |
| 747. |
The weakest form of cohesion is |
| A. | coincidental |
| B. | functional |
| C. | logical |
| D. | communicational |
| Answer» B. functional | |
| 748. |
The 'continue' statement is used to |
| A. | permit two different expressions to appear in situations where only one expression would ordinarily be used |
| B. | terminate loops or to exit from a switch |
| C. | alter the normal sequence of program execution by transferring control to some other part of the program |
| D. | All of the above |
| E. | None of the above |
| Answer» F. | |
| 749. |
The 'break' statement is used to exist from |
| A. | a do loop |
| B. | a for loop |
| C. | a switch statement |
| D. | All of the above |
| E. | None of the above |
| Answer» E. None of the above | |
| 750. |
Programmer-defined functions can be |
| A. | value-returning functions only |
| B. | void functions only |
| C. | either value-returning or void functions |
| Answer» D. | |