1/29
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
What does it mean that C++ is a compiled language?
Translates code base; then executes pre-translated version
What are library imports? What do they allow?
commands in C++ that allow access to pre-written code in libraries, enabling the use of functions, classes, and objects defined elsewhere.
How is C++ delimited? What is a delimiter?
symbols such as semicolons, braces, and parentheses, which define the boundaries of statements, code blocks, and expressions. A character or sequence of characters that separates distinct parts of the code.
What does explicitly typecast mean?
declare what data type a variable is
What are the six built-in data types in C++ (and declare them)
integer (int)
character (char)
boolean (bool)
floating point (float)
double floating point (double)
wide character (wchar_t)
What is a data type identifier?
a name assigned by the user for a program element such as variable, type, class, function, or namespace
What are strings? Are they included by default?
sequences of characters used to represent text, and they are not included by default in C++. To use them, you must include the <string> library.
What do chars actually hold? (ASCII code)
holds a single, unicode character
Be able to:
Identify the library needed; complete an example line for can and cout
is whitespace automatically added for output statements?
No
What Determines what data type your input is?
pre-defined/pre-declared variable
Why can you do math with chars?
Because they have ASCII values that represent numerical values; it ranges -128 to 127 or 0 to 265
C++ must be organized into what?
Functions
What is the function that must exist and is called by default?
“main” funtion
What are the basic comparisons and what do they mean?
== equal to
!= not equal to
< less than
<= less than or equal to
> greater than
>= greater than or equal to
How do you structure a condition statement— singular and compound, and/or? [if else]
enclosed within parentheses
if (number == 0)
compounded condition -> and="&&" /or="||"
else if (number > 0 && number < 10
Comparisons (can and cannot)
Can:
int and floats
ints and chars
floats and char
Cannot:
strings and anything else
what is a switch statement?
statements that allows you to test equality of a single variable for multiple options
how are switch options defined
cases (*?)
what does switch test for?
equality
what is a default case?
triggers if no other case did; similar to an else in an if/else statement
how should you end every case? why?
break;
if true stops the program from checking other programs
can you have compound comparisons in a while loop?
yes
how do you have a variable local to a condition / loop? what does that mean?
the local variable is inside the loop; meaning it cannot work outside of the loop
be able to:
Properly trace a condition statement
Construct the for loop
Construct a compound comparison while loops that isn't infinite
Arrays
Stores a fixed-size sequential collection of element of the same type of data; must have a set / predetermined size Built into c++
vectors
Dynamic array; can hod multiple items: NOT built into C++ can only hold one predetermined data type
Be able to:
Declare Array and Vectors
Declare Character Array
Identify/before before/after given certain functions
How can you get a string? How is this different for cin?
getline(stream,variable)
get line(cin,name)
it stores the entire line of input the user types
what is a function
group of statements what a name that can be repeatedly called