Checkpoint 10.13.1.
What happens if you don’t initialize a counter?
- Your code runs without a problem because counters are automatically initialized to zero.
- Incorrect! Variables are not automatically initialized.
- Your code might run, but it probably won’t produce the output you desire.
- Correct! C++ might assign unused memory to the uninitialized variable, which will allow the code to run, but counts may be off.
- You might get an error for using an uninitialized variable.
- Correct! Depening on your compiler, you might be lucky enough to get an error message.
- Your program will crash.
- Incorrect! You might get a compile error, but your program will not crash.