The code for setting the float variable, myFloat, to 0.16.
What is float myFloat = 0.16;?
The value of myNum.
int main()
{
int myNum = 15;
myNum %= 4;
return 0;
}
What is 3?
The return type for a function that doesn't return anything.
What is void?
The first index of all containers.
What is 0?
The 2 types of files that classes need.
What are the header (.h) and the source (.cpp) files?
The importance of having descriptive variable names.
What is give meaning/context to the values that the variables represent?
The range of rd() % 20.
What is 0 to 19?
The value of myNum.
void addOne(int num); // function declaration
int main() {
int myNum = 1;
addOne(myNum);
return 0;
}
What is 1?
The value of answer.
string ex = "No way";
int answer = ex.find("o");
What is 1?
Header files ____ functions and source files ____ them.
What is declare and define?
The library that you need for printing and getting user input.
What is iostream?
The number of times this for loop will iterate.
for (int i = 0; i < 31; i += 3) {
cout << "Pie Scorch!" << endl;
}
What is 11?
The output of this code. (Can be general about answer.)
int main() {
int myNum = 7;
cout << &myNum << endl;
}
What is the address of myNum?
The code for making the vector, myString, which contain strings.
The name of functions that make objects.
What is constructor?
The importance of the pch or stdafx libraries.
What is build your solution in Visual Studio?
The value of myNum.
int myNum = 0;
int case = 1;
switch (case) {
case 0:
myNum = myNum + 1;
case 1:
myNum = myNum + 1;
case 2:
myNum = myNum + 1;
}
What is 2?
void myFunc(int myNum) {
if (myNum % 2 == 0)
cout << "Da" << endl;
else
cout << "Ja" << endl;
}
What is check if the number is even?
The code for a for each loop if there is an array of integers named myNums.
What is ...
for (int num : myNums) {
}
...?
These things usually go in the private section of classes.
What are variables?
The importance of header files.
What is share code between files or organize your code?
The code for properly opening "open_me.txt" and writing "Hello!" in it. (Don't need to check if it opened successfully. Hint: 6 lines.)
What is...
#include <fstream>
using namespace std;
fstream file;
file.open("open_me.txt", ios::out);
file << "Hello!";
file.close();
...?
The name of the operator, *.
What is the dereference operator?
The difference between arrays and vectors.
What is scope indicator?