Input/Output
Data Types
Operators
Variables
Miscellaneous
100

What does cin stand for?

Console Input

100

What are three data types?

The data types are long, short, void, bool, string, char, int, float, double, and auto. (you can have any three)
100

Name the five arithmetic (aka mathematic) operators.

Bonus 100 points (using the order of operations):

(15*2 + 16) / 0

The five mathematical operators are addition (+), subtraction (-), multiplication (*), division (/), and modulus (%).

In case you forgot, modulus takes the remainder after you divide it. (ex. 15 % 4 is 3)

100

What are the two things you can do to a variable?

You can retrieve the value (aka accessing the value), and you can also assign it a value (aka giving it a value).

100

What symbol punctuation ends almost all lines of C++ code?


200

What do you always need to input into?

You always need to input into a variable.

200

What data type can store words?

The data type string can store words (and more generally, characters)

200

What does the != boolean operator do?

The != boolean operator means 'not equal to', which is the opposite of ==, which means 'equal to'. ! also means not, which is a handy way to remember it too.

Tip: !(a == b) is the same as a != b

200
Is it possible to declare and assign two variables in one line?

Yes, it is possible. Here's an example:

int a = 5, b = 7;

However, this would not work:

int a, b = 5, 7;

200

What type of programming is C++?

Computer Oriented Programming (COP)

Object Oriented Programming (OOP)

User Oriented Programming (UOP)

Programming Oriented Programming (POP)

The answer is Object Oriented Programming (OOP).

300

What are the two input and output keywords?

The two input and output keywords are cin and cout.

300

Why are floats called floats?

Float is short for floating-point integer, where the decimal is a 'floating' point inside an integer number. floats also take up about twice the memory of an integer.

300

What does the || operator do?

The || operator, aka or, returns true if any argument in the expression is true.

For example:

true || false is true

false || false is false

300

What are the three parts of a variable?

The three parts of the variable are the data type, the name, and the value.

300

What language was C++ based off of?

C++ was based on the language C. The name C++ comes from the ++ increment operator in C++ because C++ is one step above C..

400

What is the console?

It is the black box where you can interact with the program.

400

What two data types can a variable with data type bool store?

The boolean data type can have two values: true and false (lowercase).

400

What are compound assignment operators? (Hint: They change the value of a variable)

Bonus 100 pts: Can you name all of them? 

Compound assignment operators are exactly what they sound like: compound assignment. 

They compress an expression like a = a + b into something easier to read and write: a += b, which means you're adding b to a.

The compound assignment operators are: +=, -=, *=, /=, %=

400

If you initialize/declare a variable without assigning it a value, what will the value of the variable be?

The value would be whatever is in the memory slot that the variable uses. Sometimes computers don't clear the memory slots after you're done using a piece of data, so when you initialize a variable and it happens to use those few pieces of memory, it will get whatever was left behind. Different compilers would give different things.

400

What is the standard file extension for a C++ source code file?

.cs

.cpp

.c

.mp3

.png

.go

.MD

The correct answer is .cpp

500

What is the >> operator called? (hint: the other one is called the extraction operator)

The >> is called the insertion operator because it is used during input and inserts data from the console into the variable.

500

What is one way to initialize a variable with data type char and assign it a value to be '5'? Try to put it on one line. 

Here are four possible ways to initialize the variable:

char my_char = '5';

char my_char = 53;

char my_char{'5'};

char my_char{53};

500

What boolean does this shorten to (extra time for this one :D)?

!((true || false) && false)

The answer would be true. Here is an expanded version with the steps:

!((true || false) && false)

!(true && false)

!(false)

true

Or, you could observe that (a && false) is always false, and take the opposite of that.

500

Which variable name below will work (as in it doesn't give an error when you use it)?

1234onetwothreefour

a_b_c_d_e_sing_along_with_me

16

o0o0o0o0o0o

this_one_doesnt_work

bool

The fifth variable name, this_one_doesnt_work, works.

However, if you add an apostrophe, like this: this_one_doesn't_work, it will not work.

500

What was C++ called before it was called C++?

C-Improved

The New C

C#

The correct answer is "The New C".

M
e
n
u