Check what you learned about variables, initialization and std::cin.
std::cin
1. Which of these are valid variable names?
my age
_count
age
2player
player2
2. What value does x hold after int x{};?
x
int x{};
1
0
3. What happens with int x = 10.5;?
int x = 10.5;
10
11
10.5
4. What happens with int x{10.5};?
int x{10.5};
5. Which keyword makes a variable impossible to change after it is initialized?
6. Which line reads a number from the user into age?
std::cin >> age;
std::cout >> age;
std::cin << age;
std::cout << age;
7. After int age{10};, which line changes age to 20?
int age{10};
int age = 20;
age = 20;
age{20};
const age = 20;