A char literal can be enclosed either in single or double quotes. True or false?
Front
false
Back
valid or invalid:
DVD_ROM
Front
valid
Back
Identifier
Front
a name that is used to refer to a function or data object
Back
Object Program
Front
The machine language version of a source code.
Back
valid or invalid:
2morrow
Front
invalid. must begin with letter
Back
Algorithm
Front
A step-by-step procedure for solving a problem in a finite amount of time.
Back
Data
Front
Information in a form a computer can use
Back
10. Memory (RAM) is a peripheral device. True or False?
Front
False, Peripheral devices are external to the CPU and its main memory.
Back
Named constant
Front
an identifier referring to a value that cannot be changed.
Back
Semantics
Front
the set of rules that determines the meaning of instructions written in a programming language.
Back
A reserved word is named constant that is predefined in C++. True or false?
Front
false
Back
Compiler
Front
A program that translate a high-level language into machine code
Back
Strategy:Merging solutions
Front
Combine the steps in two or more different algorithms
Back
Programming Language
Front
A set of rules, symbols, and special words used to construct a computer program
Back
Metalanguage
Front
a language that is used to write the rules for another language.
Back
Computer Program
Front
A sequence of instructions to be performed by a computer
Back
7. What is the advantage of writing a program in a standardized programming language?
Front
It allows programmers to use the code in different computers - portable code
Back
Data type
Front
a specific set of values, along with operations that can be applied to those values.
Back
Syntax
Front
the formal rules governing how valid instructions are written in a programming language.
Back
Strategy: Divide and conquer
Front
Break up the problem into more manageable pieces
Back
Literal
Front
a value that appears in a program
Back
Computer
Front
A programmable device that can store, retrieve, and process data.
Back
9. The editor is a peripheral device, True or False?
Front
False, the editor is a software
Back
Documentation
Front
The written text and comments that make a program easier for others to understand, use and modify.
Back
Variable
Front
An identifier referring to a value that can be changed.
Back
Programming
Front
Planning or scheduling the performance of a task or event.
Back
Strategy: Building-block approach
Front
Join existing problem-solutions together
Back
vaild or invalid:
page#
Front
invalid. # not allowed
Back
Strategy: Ask questions
Front
Gather more information to help you discover a solution
Back
Assembler
Front
A program that translates an assembly language program into machine code
Back
If testing uncovers an error, to which step in the software life cycle does the programmer return?
Front
The analysis and specification step within the problem-solving phase.
Back
Assembly Language
Front
A low-level programming language in which a mnemonic is used to represent each of the instructions for a particular computer.
Back
valid or invalid:
Const
Front
invalid. reserved words not allowed
Back
Function
Front
a subprogram in C++.
Back
Valid or invalid:
all-In-One
Front
Invalid. hyphens not allowed
Back
valid or invalid:
theDog
Front
valid
Back
Information
Front
Any knowledge that can be communicated.
Back
11. Is it a case of software piracy if you and a friend buy a piece of software together and install it on both of your computers? The license for the software says that it can be registered to just one user.
Front
Yes. If the software license restricts use to a single computer or a single user, its still piracy, even though you split the cost
Back
The null string represents a string containing no characters. True or false?
Front
true
Back
Strategy: Look for things that are familiar
Front
Identify aspects of the problem that you've solved before
Back
Machine Language
Front
The language, made up of binary coded instructions, that is used directly by the computer.
Back
Concatenation works with a char value when its other operand is a string value. True or false?
Front
true
Back
valid or invalid:
recycling
Front
valid
Back
8. What does the control unit do?
Front
directs the actions of the other components in the computer to execute program instruction in the proper order.
Back
Strategy: Solve by analogy
Front
Identify aspects of the problem that are similar to a problem in a different domain
Back
Source Program
Front
A Program written in a high-level programming language.
Back
Expression
Front
an arrangement of identifiers, literals, and operators that can be evaluated.
Back
Termination condition
Front
The condition that causes the loop to exit]
Back
valid or invalid:
elizabeth_the_2nd
Front
valid
Back
Strategy: Means-ends analysis
Front
Look at the input, output, and available operations and find a sequence of operations that transform the input into the output.
Back
Section 2
(50 cards)
Can we concatenate endl with a string in an expression? Explain.
Front
No. the endl identifier is a manipulator, and is not a string value.
Back
The "equals or greater" operator in C++ is written =>. True or False?
Front
false. >=
Back
Which c++ construct do we use to implement modules?
Front
pseudocode
Back
The bool operators have lower precedence than the arithmetic operators, with the exception of the ! operator, which has the same precedence as unary minus. True or False?
Front
true
Back
1st step in the problem-solving phase of the software life cycle:
Analysis and specifications
Front
understand (define) the problem and what the solution must do
Back
List the three steps in the problem-solving phase of the software life cycle
Front
Analysis and specifications. general solutions. vertify
Back
What are the four integral types in C++? List them in order of size, from smallest to largest
Front
char, short, int, long
Back
What is the result if the computer tries to calculate a value that is larger than the maximum integer allowed for a given integral type?
Front
integer overflow
Back
Is MAIN a value-returning function or a void function?
Front
void function
Back
What is wrong with each of the following statements?
cout >> maximum
Front
cout << maximum
Back
What are the two meanings of the / operator?
Front
division for floating-point and integer
Back
Define the term "flow of control."
Front
The order in which the computer executes statements in a program
Back
Void function
Front
A function that is called as a separate statement
Back
What is the name of the C++ construct that begins with { and ends with }?
Front
a block
Back
2nd step in the problem-solving phase of the software life cycle:
General Solution
Front
(algorithm) develop a logical sequence of steps that solves the problem
Back
Type coercion
Front
Implicitly changing a value of one type into another
Back
How do we insert a double quote into a string?
Front
By preceding it with a backslash character (\").
Back
The open function is associated with both the ifstream and the ofstream data types. True or False?
Front
true
Back
Functional equivalence
Front
A property of module that performs exactly the same operation as the abstract step it defines. A pair of modules are functionally equivalent when they perform the exact same operation.
Back
Binary operator
Front
An operator with two operands
Back
1. The statement cin >> maximum >> minimum; is equivalent to the two statements:
cin >> minimum;
cin >> maximum;
True or false?
Front
true
Back
Module
Front
A self-contained collection of steps that solves a problem of subproblem
(Can contain both concrete and abstract step)
Back
How do you write a string that is too long to fit on a single line?
Front
By splitting it into pieces that fit on a line, and joining them with the concatenation operator.
Back
The increment and decrement operators can either precede or follow their operand. True or false?
Front
true
Back
The statement
count = count + 1;
is equivalent to which C++ operator?
Front
Increment operator
Back
What is wrong with each of the following statements?getline(someString, cin)
Front
getline.cin, someString.
Back
Argument list
Front
The values that appear between the parentheses in a function call
Back
Just opening an input file stream cannot cause it to enter the fail state. True or False?
Front
false
Back
List the steps in the implementation phase of the software life cycle
Front
concrete solutions. test (long answer)
Back
When you try to open a file that doesn't exist, C++ outputs an error message and terminate execution of the program. True or False?
Front
false
Back
Mixed type expression
Front
A computation involving both floating-point and integer values
Back
What is wrong with each of the following statements?
cin << score
Front
cin >> score
Back
Concrete step
Front
A step for which the implementation details are fully specified.
Back
Abstract step
Front
A step for which some implementation details remain unspecified
Back
The prefix and postfix forms of the increment operator (++) always behave the same way. We can use them interchangeably anywhere in C++ code. True or false? Explain your answer.
Front
true
Back
Type casting
Front
Explicitly changing a value of one type into another
Back
Functional cohesion
Front
A property of a module in which all concrete steps are directed toward solving just one problem, and any significant subproblems are written as abstract steps
Back
What does the manipulator fixed do?
Front
write floating-point values in fixed-point notation
Back
What does the function tolower do?
Front
ensures that the first letter of a string is lowercase
Back
What is wrong with each of the following statements?
cin >> "Enter data"
Front
cout << "Enter Data"
Back
What does the #include preprocessor directive do?
Front
It tells the C++ preprocessor to insert the contents of a specified file at that point in the code.
Back
In a floating-point value, what does it mean when the letter E appears as part of a number?
Front
exponent of base-10.
Back
3rd step in the problem-solving phase of the software life cycle:
Vertify
Front
follow the steps exactly to see if the solution really does solve the problem
Back
The values true and false are keywords in C++. True or False?
Front
False. They are predefined constants.
Back
The integer and floating-point types in C++ are considered (simple?, address?, structured?) data types
Front
simple
Back
Unary operator
Front
An operator with just one operand
Back
What does the function toupper do?
Front
ensures that the first letter of a string is uppercase. first letter is accessed and changed to uppercase. Then the string is concatenated with the original string
Back
What is the purpose of the following statements?
Ifstream inFile;
infile.open("datafile.dat");
Front
open, read and process the file data
Back
Which data type do we use to declare a variable to hold the result of applying the length function to a string?
Front
substr
Back
What is wrong with each of the following statements?
cin.ignore('Y', 35)
Front
cin.ignore(35,'Y')
Back
Section 3
(16 cards)
Is there any limit to how deeply we can nest If statements?
Front
no limit, but a human reader may find it difficult to follow too many levels.
Back
Priming reads aren't necessary when a loop is controlled by a sentinel value. True or false
Front
true
Back
We enclose the logical expression in an If statement in parentheses only to make the code more readable. C++ doesn't require the parentheses. True or False?
Front
false. parentheses required
Back
Count-controlled loop
Front
A loop that executes a specified number of times
Back
Iteration counter
Front
A variable that is incremented with each iteration of a loop
Back
Using a block as the body of the While statement enables us to place any number of statements within a loop. True or False?
Front
true
Back
Loop test
Front
When the decision is made whether to begin a new iteration or to exit
Back
Loop entry
Front
When the flow of control reaches the first statement inside a loop\
Back
Event-controlled loop
Front
A loop that exits when a specific condition is encountered
Back
How would you write a Boolean expression in an If statement if you want the statement's then-clause to execute when file inData is in the fail state?
Front
!inData
Back
The body of the While statement is always executed at least once. True or False?
Front
false
Back
Iteration
Front
An individual pass through a loop
Back
Event counter
Front
A variable that is incremented each time a particular condition is encountered
Back
Loop exit
Front
When control passes to the statement following the loop
Back
The While statement exits when the termination condition becomes true. True or False?
Front
False
Back
How do you fix a nested statement that has a dangling else?