Toggle Navigation
Games
Blog
Class PIN
Join for Free
Sign in
Toggle Navigation
Games
PIN
Join for Free
Blog
Pricing
Contact us
Help center
Sign in
Study
C++ coding
0
%
0
0
0
Back
Restart
True or False: The int data type can store decimal values.
False.
Oops!
Okay!
True or False: A string variable can hold numbers as well as text.
True. (Numbers in string are treated as text.)
Oops!
Okay!
What will this code output?
Oops!
Okay!
Fill in the blanks to make this code work:
<iostream>, std, main
Oops!
Okay!
Name two basic variable types in C++.
string, int, float
Oops!
Okay!
True or False: You must declare a variable before you use it in C++.
True.
Oops!
Okay!
Complete the sentence: The main() function is the ________ point of a C++ program.
starting
Oops!
Okay!
What will this code output?
Hello, Alice!
Oops!
Okay!
What's wrong with this code?
Missing a semicolon after endl
Oops!
Okay!
If you want to store the number 3.14, which data type would you use?
float
Oops!
Okay!
What happens if you don’t include using namespace std;?
You must write std::cout and std::cin instead of cout and cin.
Oops!
Okay!
Complete the sentence: The ______ keyword moves the output to the next line
endl
Oops!
Okay!
Which variable type would you use to store the following: a person's height in meters
float
Oops!
Okay!
What will this code output?
look at the board
Oops!
Okay!
True or false: A float variable can store whole numbers.
True (though it is usually used for decimal values).
Oops!
Okay!
Fill in the blank: In C++, the ________ keyword is used to declare a variable that stores text.
string
Oops!
Okay!
What will happen if you forget the return 0; statement in main()?
In most modern compilers, the program will still run, as it assumes return 0;, but it’s good practice to include it.
Oops!
Okay!
Which variable type would you use to store the following: a person's name
string
Oops!
Okay!
What's wrong with this code?
Missing a semicolon after endl
Oops!
Okay!
What will this code output?
The result of a / 2 is: 7
Oops!
Okay!
Which variable type would you use to store the following: a person's age
int
Oops!
Okay!
Your experience on this site will be improved by allowing cookies.
Allow cookies