Edit Game
C++ coding
 Delete

Use commas to add multiple tags

 Private  Unlisted  Public



 Save

Delimiter between question and answer:

Tips:

  • No column headers.
  • Each line maps to a question.
  • If the delimiter is used in a question, the question should be surrounded by double quotes: "My, question","My, answer"
  • The first answer in the multiple choice question must be the correct answer.






 Save   21  Close
True or False: A string variable can hold numbers as well as text.
True. (Numbers in string are treated as text.)
What will this code output?
look at the board
True or False: The int data type can store decimal values.
False.
What happens if you don’t include using namespace std;?
You must write std::cout and std::cin instead of cout and cin.
What will this code output?
Hello, Alice!
Complete the sentence: The ______ keyword moves the output to the next line
endl
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.
Complete the sentence: The main() function is the ________ point of a C++ program.
starting
True or False: You must declare a variable before you use it in C++.
True.
If you want to store the number 3.14, which data type would you use?
float
Fill in the blanks to make this code work:
<iostream>, std, main
Fill in the blank: In C++, the ________ keyword is used to declare a variable that stores text.
string
True or false: A float variable can store whole numbers.
True (though it is usually used for decimal values).
Which variable type would you use to store the following: a person's height in meters
float
Which variable type would you use to store the following: a person's age
int
Which variable type would you use to store the following: a person's name
string
Name two basic variable types in C++.
string, int, float
What will this code output?
What will this code output?
The result of a / 2 is: 7
What's wrong with this code?
Missing a semicolon after endl
What's wrong with this code?
Missing a semicolon after endl