Checkpoint 2.5.1.
What prints when the following code is run?
int main() {
char a;
char b;
a = 'z';
b = '8';
cout << "a";
}
- a
- The string, not the variable, a will be printed.
- b
- b will not be printed.
- z
- The cout statement prints a, not the value of the variable a.
- 8
- z is the value of a and 8 will not be printed
- Nothing! There will be a compile error!
- There is no type mismatch, so there will not be a compile error.