Exam1 Flashcards
What does ALU stand for ?
Arithmetic and logic unit
What is the F D E cycle called?
Fetch Decode Execute
A machine language program consists of a sequence of ____ which the CPU interprets as commands
Binary Numbers
A ___ is close to the level of the computer, which means it resembles
the numeric machine language of the computer more than the natural language of humans.
The easiest languages for people to learn are high-level languages. They are called “high
low-level language
C was created by whom?
Bell Laboratories
When a C++ program is written, it must be typed into the computer and saved to a file…True/False
True
C++ is written in a _____
text editor
The statements written by the programmer are called ____________
source code
File saved by C++ is called _________
source file
After the source code is saved to a file, the process of translating it to machine language
can begin. During the first phase of this process, a program _______ reads the source code
preprocessor
IDE’s consist of what main components?
text editor, compiler, debugger
Programming Cycle is composed of 7 items
source code, preprocessor, modified source code, compiler, object code, linker, executable code
Programming Langues include 5 language elements
key words, programmer defined identifiers, operators, punctuation, syntax
= is an ____
operator
a semicolon is part of what programming language element
punctuation
A __ is a complete instruction that causes the computer to perform some action.
statement
A ___ is a named storage location in the computer’s memory for holding a piece of data.
variable
variables are stored in computer’s _____
RAM
variables are usually _____ and _____
characters and numbers
A ____ is a diagram that graphically depicts the structure of a program
hierarchy chart
A ____ is a diagram that shows the logical flow of a program.
flowchart
______is a cross between human language and a programming language.
pseudocode
____, also called logic errors, are mistakes that cause a program to produce erroneous results.
logical errors
// means
comment
When a line begins with a #it indicates it
is a _______
preprocessor directive
The ________ contains code that allows a C++ program to display output on
the screen and read input from the keyboard
iostream file
The iostream file is called a ________file, so it
should be included at the head, or top, of the program.
header
using namespace std; is a _____ file
header
The statement using ___ declares that the program will be accessing entities whose names are part of the namespace called std.
namespace std;
A ___can be thought of as a group of one or
more programming statements that has a name
function
what is the name of this function? int main()
main
what character is associated with the beginning and ending of a function
braces {}
the group of characters
inside the quotation marks is called a ______
string
what line sends the integer value 0 back to the operating system upon the program’s completion.
return 0;
Marks the beginning of a comment.
//
Marks the beginning of a preprocessor directive.
#
Encloses a filename when used with the #include
directive
< >
Used in naming a function, as in int main()
()
Encloses a group of statements, such as the contents of a function.
{}
Encloses a string of characters, such as a message that is to
be printed on the screen.
” “
Marks the end of a complete programming statement.
;
___ is used to display information on the computer’s screen.
cout
When the «
symbol is used this way _____
stream-insertion operator
endl means
end line
\nis an example of an
escape sequence
Causes the cursor to go to the next line for subsequent printing.
\n
Causes the cursor to skip over to the next tab stop
\t
The _____ directive causes the contents of another file to be inserted
into the program.
include
include is part of what library
input-output stream library
______ represent storage locations in the computer’s memory.
Variables
_______ are data items whose values cannot change while the program
is running
constants
number = 5; is an ______ and = is called a _______
assignment statement and the = sign is called the assignment operator.
The item on the left hand side of an assignment statement must be a _____
variable
constants variable names must always be ?
CAPITALIZED
and cannot be used as a variable…true/false
true
3dGraph can be a variable name..true/false
false
Mixture#3 can be a variable name..true/false
false
Integers are whole numbers like −2, 19, and 24. True/False
True
Floating-point numbers have a decimal
point like −2.35, 19.0, and 0.024 True/False
True
int data type can hold how many bytes?
4
A variable of the ____data type holds only a single character.
char
what character set type do you reference?
ASCII
what is the class for string?
what is the preprocessor header for string?
include
what is a string variable type?
string object
Floating-point data types are used to define variables that can hold real numbers. True/False
True
The floatdata type is considered ____
single precision.
The doubledata type is usually twice
as big as float, so it is considered ____
double precision
Boolean variables are set to either ___ or ____
true or false