Intro to C++ Flashcards
What does the #include directive do?
Causes another file to be inserted into the program. Usually library files that contain specific definitions.
C++ is case sensitive, which means…
Anything written in lowercase will not be read the same way as something in uppercase.
All programs must have a…
main function.
What are the two ways that main can be defined?
int main() and void main(void)
What do output statements do?
send the user messages, results, questions, etc from the computer.
What format does an output statement usually take?
the cout object, the insertion operator, and variables or constants to be displayed.
What is the insertion operator?
«
What is an escape sequence?
something that performs a specific output task when enclosed in quotes.
What does \n do?
causes the cursor to go to the next line
what does \t do?
causes the cursor to go to the next tab stop.
What does \a do?
Causes the computer to beep
What does \ do?
Causes a backslash to be printed.
What does ' do?
Causes a single quote to be printed.
What does " do?
Causes a double quote to be printed.
what does endl do?
returns output to next line.
What is an identifier?
names or symbols used by the programmer to refer to times such as variables, named constants, functions, classes, ect.
What words are off limits as identifiers?
Any key words or reserved words.
What must an identifier be comprised of?
Only letters, numbers, or the underscore.
What is the rule for the first character of an identifier?
it must be a letter or underscore.
What do variables refer to?
memory locations in which the value stored may change throughout the execution of the program.
What do named or symbolic constants refer to?
memory locations in which the values do not change during the course of the program.
You must define or declare a variable before you may use it!
.
What is the format of a variable definition?
datatype variablename;
What is false represented as in a computer
Zero
What is true represented as in a computer
True is one and any number other than zero
What does datatype char hold
A single character value