Create an account
Computers process data under the control of sets of instructions called computer _________.
input unit - output unit - memory unit - arithmetic and logic unit - central processing unit - secondary storage unit
The six key logical units of the computer are the ________, ________, ________, _________, _________ and the ________.
machine languages - assembly languages - high-level languages
,The three classes of languages discussed in the chapter are ________, ________, and ________.
The programs that translate high-level language programs into machine language are called ________.
The Department of Defense developed the Ada language with a capability called ________, which allows programmers to specify that many activities can proceed in parallel.
In a C++ system, a(n) ________ program executes before the compiler's translation phase begins.
The ________ program combines the output of the compiler with various library functions to produce an executable image.
Objects have the property of ________although objects may know how to communicate with one another across well-defined interfaces, they normally are not allowed to know how other objects are implemented.
C++ programmers concentrate on creating ________, which contain data members and the member functions that manipulate those data members and provide services to clients.
Classes can have relationships with other classes. These relationships are called ________.
object-oriented analysis and design (OOAD)
The process of analyzing and designing a system from an object-oriented point of view is called ________.
OOD also takes advantage of ________ relationships, where new classes of objects are derived by absorbing characteristics of existing classes, then adding unique characteristics of their own.
Unified Modeling Language(UML)
________ is a graphical language that allows people who design software systems to use an industry-standard notation to represent them.
Why might you want to write a program in a machine-independent language instead of amachine-dependent language? Why might a machine-dependent language be more appropriate forwriting certain types of programs?
Machine independent languages are useful for writing programs to be executed on multiple computer platforms. Machine dependent languages are appropriate forwriting programs to be executed on a single platform.
Which logical unit of the computer receives information from outside the computer foruse by the computer?
What type of computer language uses English-like abbreviations for machine language instructions?
Which logical unit of the computer sends information that has already been processed by the computer to various devices so that the information may be used outside the computer?
The level of computer language most convenient to the programmer for writing programs quickly and easily is
central processing unit
Which logical unit of the computer coordinates the activities of all the other logical units?
This refers to the standard input device. The standard input device is normally connected to the keyboard
This refers to the standard output device. The standard output device is normally connected to the computer screen.
This refers to the standard error device. Error messages are normally sent to this device which is typically connected to the computer screen.
Why is so much attention today focused on object-oriented programming?
Object-oriented programming enables the programmer to build reusable software components that model items in the real world. Building software quickly, correctly,and economically has been an elusive goal in the software industry. The modular, ob-ject-oriented design and implementation approach has been found to increase pro-ductivity while reducing development time, errors, and cost.
The _________ begins the body of every function and the _________ ends the body of every function.
The escape sequence \n represents the _________ character, which causes the cursor to position to the beginning of the next line on the screen.
Comments do not cause the computer to print the text after the____ on the screen when the program is executed.
The escape sequence ___, when output with cout and the stream insertion operator, causes the cursor to position to the beginning of the next line on the screen.
int c, thisIsAVariable, q76354, number;
Declare the variables c, thisIsAVariable, q76354 and number to be of type int.
std::cout << "Enter an integer: ";
Prompt the user to enter an integer. End your prompting message with a colon (:) followed by a space and leave the cursor positioned after the space.
std::cin >> age;
Read an integer from the user at the keyboard and store the value entered in integer variable age.
if ( number != 7 )
std::cout << "The variable number is not equal to 7\n";
If the variable number is not equal to 7, print "The variable number is not equal to 7".
std::cout << "This is a C++\nprogram\n";
Print the message "This is a C++ program" on two lines. End the first line with C++.
std::cout << "This\nis\na\nC++\nprogram\n";
Print the message "This is a C++ program" with each word on a separate line.
std::cout << "This\tis\ta\tC++\tprogram\n";
Print the message "This is a C++ program" with each word separated from the next by a tab.
// Calculate the product of three integers
Comment that a program calculates the product of three integers.
Declare the variables x, y, z and result to be of type int (in separate statements).
cin >> x >> y >> z;
Read three integers from the keyboard and store them in the variables x, y and z.
result = x y z;
Compute the product of the three integers contained in variables x, y and z, and assign the result to the variable result.
cout << "The product is " << result << endl;
Print "The product is " followed by the value of the variable result.
Each parameter in a function header should specify both a(n) _________ and a(n) _________.
When each object of a class maintains its own copy of an attribute, the variable that represents the attribute is also known as a(n) _________.
Return type _________ indicates that a function will perform a task but will not return any information when it completes its task.
Function _________ from the <string> library reads characters until a newline character is encountered, then copies those characters into the specified string.
binary scope resolution operator (::)
When a member function is defined outside the class definition, the function header must include the class name and the _________, followed by the function name to "tie" the member function to the class definition.
The source-code file and any other files that use a class can include the class's header file via an _________ preprocessor directive.
Sequence, selection and repetition
All programs can be written in terms of three types of control structures:_______, ________and_________.
The_________selection statement is used to execute one action when a condition is TRue or a different action when that condition is false.
What is the difference between a local variable and a data member?
A local variable is declared in the body of a function and can be used only from the point at which it is declared to the immediately following closing brace. A data member is declared in a class definition, but not in the body of any of the class's member functions. Every object (instance) of a class has a separate copy of the class's data members. Also, data members are accessible to all member functions of the class.
Explain the purpose of a function parameter. What is the difference between a parameter and an argument?
A parameter represents additional information that a function requires to perform its task. Each parameter required by a function is specified in the function header. An argument is the value supplied in the function call. When the function is called, the argument value is passed into the function parameter so that the function can perform its task.
Counter-controlled or definite
Repeating a set of instructions a specific number of times is called_________repetition.
Sentinel, signal, flag or dummy
When it is not known in advance how many times a set of statements will be repeated, a(n)_________value can be used to terminate the repetition.
A variable that is known only within the function in which it is defined is called a(n) ________.
The ________ statement in a called function passes the value of an expression back to the calling function.
The keyword ________ is used in a function header to indicate that a function does not return a value or to indicate that a function contains no parameters.
The ________ of an identifier is the portion of the program in which the identifier can be used.
return;, return expression; or encounter the closing right brace of a function.
The three ways to return control from a called function to a caller are ________, ________ and ________.
A(n)________ allows the compiler to check the number, types and order of the arguments passed to a function.
auto, register, extern, static
The storage-class specifiers are mutable, ________, ________, ________ and ________.
Variables declared in a block or in the parameter list of a function are assumed to be of storage class ________ unless specified otherwise.
Storage-class specifier ________ is a recommendation to the compiler to store a variable in one of the computer's registers.
For a local variable in a function to retain its value between calls to the function, it must be declared with the ________ storage-class specifier.
function scope, file scope, block scope, function-prototype scope, class scope, namespace scope
The six possible scopes of an identifier are ________, ________, ________, ________, ________ and ________.
A function that calls itself either directly or indirectly (i.e., through another function) is a(n) ________ function.
A recursive function typically has two components: One that provides a means for the recursion to terminate by testing for a(n) ________ case and one that expresses the problem as a recursive call for a slightly simpler problem than the original call.
In C++, it is possible to have various functions with the same name that operate on different types or numbers of arguments. This is called function ________.
unary scope resolution operator (::)
The ________ enables access to a global variable with the same name as a variable in the current scope.
A function ________ enables a single function to be defined to perform a task on many different data types.
This creates a reference parameter of type "reference to double" that enables the function to modify the original variable in the calling function.
Why would a function prototype contain a parameter type declaration such as double &?
Each time you run the program, it will generate the same pattern of numbers.
Why is it often necessary to scale or shift the values produced by rand?
The elements of an array are related by the fact that they have the same ________ and ___________.
subscript (or index)
The number used to refer to a particular element of an array is called its ________.
A(n) __________ should be used to declare the size of an array, because it makes the program more scalable.
The process of determining if an array contains a particular key value is called _________ the array.
0, NULL, an address
The three values that can be used to initialize a pointer are_____________,__________ and___________.
dot (.), arrow (->)
Class members are accessed via the ________ operator in conjunction with the name of an object (or reference to an object) of the class or via the ___________ operator in conjunction with a pointer to an object of the class.
Class members specified as _________ are accessible only to member functions of the class and friends of the class.
Class members specified as _________ are accessible anywhere an object of the class is in scope.
Default memberwise assignment (performed by the assignment operator).
__________ can be used to assign an object of a class to another object of the same class.
To qualify hidden names so that they can be used.
What is the purpose of the scope resolution operator?
A nonmember function must be declared as a(n) __________ of a class to have access to that class's private data members.
The __________ operator dynamically allocates memory for an object of a specified type and returns a __________ to that type.
An object's non-static member functions have access to a "self pointer" to the object called the __________ pointer.
The keyword __________ specifies that an object or variable is not modifiable after it is initialized.
If a member initializer is not provided for a member object of a class, the object's __________ is called.
A member function should be declared static if it does not access __________ class members.
Please allow access to your computer’s microphone to use Voice Recording.
Having trouble? Click here for help.
We can’t access your microphone!
Click the icon above to update your browser permissions and try again
Reload the page to try again!Reload
Press Cmd-0 to reset your zoom
Press Ctrl-0 to reset your zoom
It looks like your browser might be zoomed in or out. Your browser needs to be zoomed to a normal size to record audio.
Please upgrade Flash or install Chrome
to use Voice Recording.
For more help, see our troubleshooting page.
Your microphone is muted
For help fixing this issue, see this FAQ.
Star this term
You can study starred terms together