Variables and Constants
Selection Structure
No bugs here!
SFML and Games
What's the output?
100

int, double, char, string, etc. are examples of this?

What is variable type?

100

The modulus operator uses this symbol.

What is %?

100

int main () {
  cout >> "What's your name? ";

}

What is << ?

100

The line that includes the SFML library.

What is #inlude <SFML/Graphics.hpp> ?
100

int main() {
        for (int i = 1; i <= 5; ++i) {
             cout << i << " ";
    }
    return 0;
}

What is 1 2 3 4 5 ?

200

The value 3. would be this variable type.

What is a double (or float)?

200

Used to repeat a specific block of code a known number of times.

What is a for loop?

200

for (int i = 1; i++; i <= 5) {
        cout << i << " ";

}

What is (int i = 1; i <= 5; i++;)?

200

Line of code needed when you don't want to continuously type "sf::"?

What is using namespace sf; ?

200

string line = "Look at me, I can write C++ code!";
cout << "Hey! " << line << endl;

What is Hey! Look at me, I can write C++ code! ?

300

A variable type that contains a variable enclosed within single quotes (as opposed to double quotes).

What is a char?

300

The increment operator in C++.

What is ++?

300

int main() { 

     cin >> x; 

     cout << x; 

}

What is declaring variable?

300

You have a shape called Circle. You fill the shape with the color white.

What is Circle.setFillColor(sf::Color::White); ?

300

int i = 3;
while(i>0) {
 cout << i << endl;
 --i;
}

What is:

3

2

1

400

If I have an int called 'n', use this command to read the integer from the user. (Hint: c??)


What is cin >> n; ?

400

This represents the AND logical operator for conditional statements in C++.

What is &&?

400

void menu(); 

int main() 

{

     //... 

     menu(); 

void menu(); 

//... 

}

What is extra semicolon? (line 7)

400

Command used when you want to display a variable called background on the SFML window. (Hint: draw something on the window)

What is window.draw(background); ?

400

for(int i = 0 ; i < 3; ++i)
{
 cout << (i * 2) << endl;
}

What is:

0

2

4

500

A variable that holds a memory address.

What is a pointer?

500

Dynamic arrays with the ability to resize itself automatically when an element is inserted or deleted.

What is a vector?

500

char done = 'Y'; 

   while (done = 'Y') { 

   //... 

   cout << "Continue? (Y/N)"; 

   cin >> done; 

}

What is == ? (in while loop condition)

500

You have a texture called "Bob". You want to load the "bob.png" file to this texture. bob.png is in your folder named "images".

What is Bob.loadFromFile("images/bob.png"); ?

500

string movie = "Terminator";
if((movie == "Terminator") && movie.find("Term") != string::npos)
{
 cout << "found it" << endl;
}

What is found it?

M
e
n
u