Programming One: Quiz One
A C++ program does not always require a main() function.
False
A computer is a machine, and like other machines, it does not need to be controlled to do the task it was meant to do
False
A data object consists of exactly one piece of data.
False
A good function name should never be a mnemonic.
False
Although a large C++ program may be stored in two separate program files, the two files must be compiled together.
False
C++ is not an object-oriented language.
False
Computers are designed to respond to heuristic commands.
False
If a program statement is syntactically correct then it is also logically correct.
False
Once an algorithm or class is written in C++, it can be executed on a computer without further translation.
False
Properly coded programs do not need comments if the program code is self-explanatory.
False
The cout object is an output object that sends data given to it to a printer.
False
A keyword is a word that is set aside by the C++ language for a special purpose and should only be used in a specified manner.
True
A programmer has the option of putting more than one program statement on a line of code.
True
Because flowcharts are cumbersome to revise and can easily support unstructured programming practices, they have fallen out of favor among professional programmers.
True
In C++ a procedure is formally referred to as a function.
True
Modular programs are usually easier to develop, correct, and modify than programs constructed in some other method.
True
Omitting or incorrectly typing the closing brace } that signifies the end of a function is one of the most common programming errors.
True
Programming is the process of writing a computer program in a language that the computer can respond to and that other programmers can understand.
True
Programming languages that use instructions resembling written languages, such as English, are referred to as high-level languages.
True
The compiler ignores all comments—they are there strictly for the convenience of anyone reading the program.
True
The concept of creating a particular object from a larger defining set, or class, of object types is fundamental to all object-oriented programming languages, such as C++.
True
The iostream file is referred to as a header file because a reference to it is always placed at the top, or head, of a C++ program using the #include command.
True
When all of the statements in a source program are translated before any one statement is executed, the programming language used is called a compiled language.
True
When placed before the function's name, the keyword int indicates that the function will return an integer value.
True
When used in a message, the backslash character alters the meaning of the character immediately following it.
True
In C++, modules can be either ____ or functions. a. classes b. methods c. objects d. procedures
a. classes
In object-oriented terms, a particular Ford Taurus with its own specific attributes of color, engine size, body type, and so on, can be considered as a car ____ from the broader class of all possible Ford Tauruses that could have been built. a. object b. element c. input d. data point
a. object
One of the motivations for the creation of ____ languages was the development of graphical screens and support for graphical user interfaces (GUIs) capable of displaying multiple windows containing both graphical shapes and text. a. object-oriented b. procedural c. high-level d. low-level
a. object-oriented
A programming language's ____ is the set of rules for formulating statements that are grammatically correct for the language. a. syntax b. namespace c. dictionary d. format
a. syntax
In a computer language, a(n) ____ is the smallest unit of the language that has a unique meaning to the compiler. a. token b. object c. method d. program
a. token
The writing of an algorithm using computer-language statements is called ____ the algorithm. a. compiling b. coding c. interpreting d. debugging
b. coding
An algorithm is a step-by-step sequence of ____ that describes how a computation is to be performed. a. data b. instructions c. objects d. classes
b. instructions
To generate a program that can be executed by the computer requires that the C++ program, which is referred to as a source program, be translated into the computer's ____. a. data b. machine language c. objects d. classes
b. machine language
You cannot write a C++ program without relying on some ____. a. high level code b. procedural code c. machine language d. pseudocode
b. procedural code
Another term for a computer program is ____. a. hardware b. software c. object d. procedure
b. software
Procedure-oriented programming is the translation of a selected ____ into a computer program by using a programming language, such as C++. a. program b. formula c. algorithm d. expression
c. algorithm
The concept of creating a particular object from a larger defining set called a ____ is fundamental to all object-oriented programming languages, such as C++. a. super-set b. master set c. class d. relationship
c. class
The main() function is referred to as a(n) ____ function because it tells the other modules the sequence in which they are to execute. a. control b. executive d. c. driver d. key
c. driver
Programs written in low-level languages usually execute ____ than programs written in high-level languages. a. more accurately b. less accurately c. faster d. slower
c. faster
The #include preprocessor command causes the contents of the named file, such as the iostream file, to be ____ wherever the #include command appears in the program. a. executed b. compiled c. inserted d. replaced
c. inserted
The first character of an identifier must be a ____ or an underscore (_). a. number b. mnemonic c. letter d. special character
c. letter
A(n) ____ program is simply a translated version of the source program that can be executed by the computer system with one more processing step. a. compiled b. debugged c. object d. C++
c. object
A ____ is the flowcharting symbol used to represent a process. a. diamond b. rhombus c. rectangle d. circle
c. rectangle
Data transmitted to a function at runtime is referred to as a(n) ____ of the function. a. dimension b. parameter c. header d. argument
d. argument
The most basic objects used in object-oriented C++ programming are ____ objects. a. numerical b. procedural c. low-level d. data
d. data
The purpose of a procedure is to accept ____ as input and transform it in some manner to produce a specific result as an output. a. numbers b. objects c. formulas d. data
d. data
Programs whose structure consist of interrelated segments arranged in a logical order to form an integrated and complete unit are referred to as ____ programs. a. well-structured b. executable c. machine-language d. modular
d. modular
We can tell the program which class or function to use by indicating the ____ where we want the compiler to look for the class or function. a. location b. address c. module d. namespace
d. namespace
Most C++ programs contain statements that use ____ for input and output and for finding such quantities as square roots, absolute values, and other commonly encountered mathematical calculations. a. classes b. objects c. databases d. preprogrammed routines
d. preprogrammed routines
When English-like phrases are used to describe an algorithm (the processing steps), the description is called ____. a. a formula b. a flowchart c. a program d. pseudocode
d. pseudocode